How to dynamically show or hide properties in a PropertyGrid?

I use PropertyGrid to customize objects. I need to be able to hide or show some properties depending on the values โ€‹โ€‹of other properties. How can this be achieved? I know about the Browsable attribute, but it only works at compile time.

+4
source share
2 answers

Take a look at the ICustomTypeDescriptor Interface .

Additional information on how to use it can be found in this article:

+3
source

Check this link Dynamic View Attribute Attribute . Using Reflection, go to the Property and set its view property to true or false.

-3
source

All Articles