I develop a custom control that have some field like below:
ControlKind, Field1 , Field2
I want to change attribute of one of field per controlKind,
Like: if controlKind == useField1, then Field1 show and Field2 hidde in properyGrid (or readonly or filter)
can i do it ?
Thanks in advance
Implement ICustomTypeDescriptor, or register a TypeDescriptionProvider and return a custom type descriptor from that, or apply TypeConverterAttribute.
In all three cases, you need to implement / override the GetProperties method to return a filtered subset of the actual properties. (In the TypeConverter approach, you must also override GetPropertiesSupported to return true.)