VisualHint's blog

Introducing Smart PropertyGrid.Net 3.0 beta

I am proud to unveil today the first beta release of Smart PropertyGrid.Net 3.0. This release is impressive by the number of improvements and changes and I will give you here the main details:

  • There was a real demand for it so I implemented it, making SPG the only PropertyGrid supporting this feature! As already advertised in this blog before, SPG now supports right to left languages. And not in a minimal way: each component of the grid, from the main display to each inplace control, is properly mirrored. Here is a screenshot with hebrew strings displayed: alt text
  • It is good to be lazy sometimes so I decided to add some lazyness to SPG. So far, simply to keep it simple, the grid was recursively loading all properties of a target instance. It has been reported that it could be costly for large contents or even worse it could lead to a crash if there was a cyclic property path. The Microsoft PropertyGrid was able to handle these situations so there was no reason to let SPG behind. That's why I added a LazyLoading mode where child properties will be loaded only when a parent is expanded.
  • Icons in front of property values are now consistently managed, which lets you add any descriptive or status information with a value. You have many options to choose your image: it can come from a global image list, a property specific image list (usually when the property publishes standard values) or directly from an image reference.
  • The next feature comes from a single customer request but I found it so smart that I was sure everyone would love it too. This is incremental search (aka auto-complete) which enables you to quickly set a new value to a property when it publishes a set of standard values. The original idea here is that you get this feature in textboxes, in dropdown lists and even in existing UITypeEditors (like the ColorEditor) when listboxes are detected. This is a terrific usability feature for your customers!
  • I never was interested by this feature but many of you were asking for it and now that it is implemented I am not unhappy to see it in action. SPG, like the Microsoft PropertyGrid before, now displays non default values with a bold font. A value is "non default" when it's different from the one that is registered with a DefaultValueAttribute or when a ShouldSerialize method exists and returns true.
  • You found that the alpha color picker was a nice addition to SPG but you were concerned by its "private" nature. Well, you can now derive from it and override many virtual methods. Choosing to show the alpha component or not is also a built-in feature.

All these major features are showcased in the modified supplied sample. To see the full list of enhancements and fixes, simply consult the changelog.