C propertygrid not updating
(This string is always created when a Property Changed of the "Values"-property is received.)My Type Converter creates instances of my Indexed Value Descriptor class (derived form Property Descriptor) and initializes each one of them with a display-name, a property-name and the index of the integer (inside the "Values"-list).
NET then you have used a property browser to browse, view, and edit the properties of one or more objects. NET Framework Property Grid control is core to the property browser that is in Visual Studio . The Property Grid control displays properties for any object or type, and it retrieves the item's properties, primarily using reflection. The following screen shot shows how it should look. Properties displayed with categories and default values in the Property Grid After working with this version of the options window, you might notice the following things: So far, the options window has displayed simple types like integers, Booleans, and strings. What if your application needs to track something like window size, document font, or toolbar color? NET Framework have special display abilities that help make them more usable in the Property Grid.
You can only disable the default Property Grid by setting the Enable property to false, but then a user won't be able to fully inspect all the properties of the selected object.
The way to go is to add the class-level Read Only Attribute, which is provided by . The main problem is how to add and remove class-level Read Only attribute to an object at runtime.
This example demonstrates how to implement a read only property grid.
The default Property Grid control provided by Win Forms doesn't support a read-only functionality.
I've tried subscribing to the Property Changed event of my object directly, and calling the Refresh() method of the Property Grid when it is envoked. Meaning changing one property may evoke multiple Property Changed events.