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
I propose adding support for custom attributes on properties auto-generated by the [ObservableProperty] in the .NET Community Toolkit. Currently, properties auto-generated using [ObservableProperty] do not support attaching additional attributes directly, limiting their application in scenarios like data validation or UI mapping.
Describe the solution
When using [ObservableProperty], there should be a way to attach additional attributes to the generated properties, rather than manually writing out the full properties.
In many cases, we need to attach specific attributes to properties of a data model for data validation, serialization control, or specific UI behaviors. For instance, we might want to use [DataAnnotations] attributes for validating data models, or custom attributes to control how columns are displayed.
Alternatives
No response
Additional info
No response
Help us help you
None
The text was updated successfully, but these errors were encountered:
Hello, 'Lwc-LiuWenCheng! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future!
Arlodotexe
transferred this issue from CommunityToolkit/WindowsCommunityToolkit
Mar 12, 2024
Describe the problem
I propose adding support for custom attributes on properties auto-generated by the [ObservableProperty] in the .NET Community Toolkit. Currently, properties auto-generated using [ObservableProperty] do not support attaching additional attributes directly, limiting their application in scenarios like data validation or UI mapping.
Describe the solution
When using [ObservableProperty], there should be a way to attach additional attributes to the generated properties, rather than manually writing out the full properties.
In many cases, we need to attach specific attributes to properties of a data model for data validation, serialization control, or specific UI behaviors. For instance, we might want to use [DataAnnotations] attributes for validating data models, or custom attributes to control how columns are displayed.
Alternatives
No response
Additional info
No response
Help us help you
None
The text was updated successfully, but these errors were encountered: