Change DisplayName attribute for a property
Asked Answered
V

1

1

I am looking for a way to change the value of the DisplayName attribute of a property at run-time. Is this even possible in Windows Forms?

Vernissage answered 30/6, 2009 at 5:18 Comment(0)
S
2

Create your own TypeDescriptionProvider for your class, and assign it at runtime to single object (or entire class) using TypeDescriptor. Also look into GetTypeDescriptor and GetProperties, and finally AttributeArray.

In general creating your own type descriptor is not so hard, but you need to read msdn carefully and do a lot of tries.

Surreptitious answered 30/6, 2009 at 6:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.