In the MVVM toolkit, is there a way to add a DisplayNameAttribute to the generated properties? #739
-
I have an observable property generated from a field, now I need to change its display name but since I only have the field in my class, I can't actually apply the attribute (property only). Is there a way to work around this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Actually, I just noticed something similar is possible via the DisplayAttribute, although that one is sadly sealed, making it a bit harder to use. Any other option would still be appreciated. |
Beta Was this translation helpful? Give feedback.
-
You can use |
Beta Was this translation helpful? Give feedback.
You can use
[property: DisplayName(...)]
on the field to forward any attributes you need on the generated property 🙂