Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show or hide properties dynamically in the PropertyGrid?

I am using a PropertyGrid for configuring objects. I need to be able to hide or show some properties depending on the values of other properties. How this can be achieved? I know about Browsable attribute, but it only works at a compile time.

like image 776
Peter17 Avatar asked Oct 25 '22 13:10

Peter17


1 Answers

Take a look into the ICustomTypeDescriptor Interface.

Further informations on how to use it can be found in this article:

  • Bending the .NET PropertyGrid to Your Will.
like image 80
Oliver Avatar answered Nov 15 '22 05:11

Oliver