Smart PropertyGrid.Net 2.5 RC1 is available
When I decided to fix the behavior of the grid regarding multiple target instances, I though it would be difficult and that after a lot of efforts it would produce a release perceived as minor (something that should be version 2.2.6) because this feature should have worked from the beginning or at least from version 2.0. So I gathered my courage and began investigating. I still learned a lot during the process and I realized that I could do better than what the Microsoft PropertyGrid does when it targets several instances.
The Microsoft grid is lost as soon as you target two instances that have common properties but whose values differ. From my point of view, this is not logical so I did my best to fix this behavior and I succeeded (there are some screencasts about this subject). The result is a release that you can consider major, and therefore labelled 2.5. Moreover I took the chance to add some very demanded features. Here are the more important points of the changelog:
- SelectedObjects has been reworked and SPG now behaves correctly regarding multiple instances. It even allows comparisons of immutable properties (the one whose TypeConverter's CreateInstanceSupported returns true) having different values.
- Displayed values (set by PropertyValue.ResetDisplayedValues or by the PropertyValueDisplayedAsAttribute) are more flexible. Before you could only set them as strings. You can now supply objects or pairs <object, string>.
- Trackbars now accept to target integer, float, double and decimal property types.
- Ctrl+Enter in a multiline textbox inserts a new line.
- By default, a listbox uses the same visuals (font, fore and back colors) than the property value. It is now possible to break this synchronization and let the listbox use the normal colors used by the grid. This is done by using the DropDownListboxVisuals attribute.
- The List feel can use a cache for properties showing a costly content that should not be recreated each time the listbox is displayed. To configure a property in such a way, mark it with UseFeelCacheAttribute. The cache can be emptied by setting PropertyValue.FeelCache to null.
- The Unit inplace control now takes into consideration a unit with a single value (a collection with a unique possible value or a simple string). In this case, no dropdown is shown and the value is just displayed as a static information.
- For list feels, the resize box can be removed by setting the PropInPlaceList.PreventResizable to true (from the InPlaceCtrlVisible event handler).
I hope you will like this this verson as much as I worked on it. If you have any question, if you are not sure what SPG can do for you or if it does a particular thing, don't hesitate: contact me.