1

I know how to prevent a property from being shown in the property grid by using this attribute [Browsable(false)]

but I want to prevent this property from being browsed only when there are more than 1 object selected in the property grid.

I mean that when only one object is selected in the property grid this property will be shown but when 2 or more objects are selected this property won't be browsable!

emartel
  • 7,712
  • 1
  • 30
  • 58

1 Answers1

0

Note: I haven't done it myself, but according to the documentation...

Have you tried BrowsableAttributes, documented here? In your selection code you could probably change the propertyGrid.BrowsableAttributes to reflect if it's a "solo" selection or "multiple" selection, and by tagging the variables accordingly, you should be able to have the display you're looking for.

This thread can probably help you!

Community
  • 1
  • 1
emartel
  • 7,712
  • 1
  • 30
  • 58