You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Let's say we have a record defined as public record Model(int PropA, string PropB).
Currently developers have to use rather verbose syntax with x:Arguments, specifying each parameter ctor independently.
Describe the solution you'd like
Since this record is well defined in IL metadata via modreq(IsExternalInit) we can match these properties with type constructor, and include automatically transform into a proper constructor call using XML property attributes as parameters.
IntelliSense shouldn't be a problem, since these ctor parameters are already defined as mutable properties, making them visible for auto-completion engine.
Bindings won't be possible in this solution. Even if it's technically possible to setup binding for an init-only property, what would we do with initial ctor values?
Additional context
It's not a commonly used pattern with XAML apps. But can be well considered into complex custom controls. Something I thought from this example #18189.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Let's say we have a record defined as
public record Model(int PropA, string PropB)
.Currently developers have to use rather verbose syntax with
x:Arguments
, specifying each parameter ctor independently.Describe the solution you'd like
Since this record is well defined in IL metadata via
modreq(IsExternalInit)
we can match these properties with type constructor, and include automatically transform into a proper constructor call using XML property attributes as parameters.IntelliSense shouldn't be a problem, since these ctor parameters are already defined as mutable properties, making them visible for auto-completion engine.
Bindings won't be possible in this solution. Even if it's technically possible to setup binding for an init-only property, what would we do with initial ctor values?
Additional context
It's not a commonly used pattern with XAML apps. But can be well considered into complex custom controls. Something I thought from this example #18189.
The text was updated successfully, but these errors were encountered: