Skip to content

Proposal: Bring C# 9 "Init-Only" properties to XAML #2519

Open

Description

Proposal: C# 9 "Init-Only" properties in XAML

Init-only properties are a set-on-initialization-only accessor in C# 9. Morten has suggested that we bring this to XAML: https://twitter.com/dotMorten/status/1263284520364564481

Interesting idea to explore. It would allow the instantiation of read-only / immutable values in XAML markup.

Summary

Unsure if this would require a syntax change/expansion in XAML...?

Rationale

(it would be great if Morten or others could articulate additional rationale & scenarios here--I'm just blitzing Twitter notifications right now so doing light initial job on this proposal)

  • {First reason for why we should consider this proposal}
  • {Second reason for why we should consider this proposal}
  • {etc}

Scope

Capability Priority
This proposal will allow developers to accomplish W Must
This proposal will allow end users to accomplish X Should
This proposal will allow developers to accomplish Y Could
This proposal will allow end users to accomplish Z Won't

Important Notes

Open Questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

feature proposalNew feature proposalneeds-winui-3Indicates that feature can only be done in WinUI 3.0 or beyond. (needs winui 3)team-MarkupIssue for the Markup team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions