"We had just exhausted the capabilities of the standard Microsoft PropertyGrid and had started writing our own extensions when we found SmartPropertyGrid. SPG negated the need for custom extensions whilst greatly simplifying and accelerating our product development.
We recently commissioned one of our expert users to do some Alpha testing and here is a direct quote from his first report:
"I'd say the model build takes around 70-80% of the time required using the existing interface, and with more experience with the new interface could reduce the time a bit further still - it really is that good!"
He is referring to the process of building transportation models using the new version of the product versus the previous version - which was based on individual object editor dialogs.
I can say in all honesty that a large part of the credit for this goes to SPG."
These 2 editors in SFPE.Net can now display a new field for frames per second. The maximum number of frames per second can be chosen in the format string. Here is a screenshot to show you an example:
As you can see, it takes the "v" character followed by the max frames count. Even a floating number can be used, like 29.97 for NTSC.
Note that this comes from a feature request received on July 16. I found it so useful (being a video editing fan myself) that I decided to work on it. The SFPE framework is so nice to use that I published the final result on July 23. Knowing that I had to work on other stuff as well, this surprised my customer who then sent one of the testimonials you can see on this page.
It seems there is no TimeSpan editor for .Net. Can you believe it? So when a customer asked me if it was possible to make one with Smart FieldPackEditor.Net, I realized I could fill a gap with a full featured duration editor, based on the flexibility of SFPE. And this is what is coming in version 1.2.
First here is a nice screenshot taken from the updated supplied sample:
You can see the editor in action and a subset of its properties in a PropertyGrid. And here are its features:
It can be used standalone, in Smart PropertyGrid or in the DataGridView. In the last case, the column of the grid can have the timespan type, long type for ticks and double type for seconds).
Flexible format string:
• D for days without leading zeros
• d for days with leading zeros
• H for hours without leading zeros
• h for hours with leading zeros
• M for minutes without leading zeros
• m for minutes with leading zeros
• S for seconds without leading zeros
• s for seconds with leading zeros
• F (up to 7 times) for ticks as fraction without trailing zeros
• f (up to 7 times) for ticks as fraction with trailing zeros
• T (up to 7 times) for standalone ticks without trailing zeros
• t (up to 7 times) for standalone ticks with trailing zeros
• ":" for the time separtor
• Static fields can be added, something like d 'days' H 'hours'
Min and Max values can be set.
The most significant field has no max value (except as specified by the global max value set), so you can have a value of 24 hours and more if needed.
Updown button can be displayed.
Nullable (with delete key or checkbox).
Auto-incrementation can be switched on (for ex, seconds passing from 59 to 0 will increment minutes, and so on).
A new FieldAdded event allows you to modify a field on the fly, for example to change the “day” static string to the plural “days” depending on the current value.
This new editor is a free addition to Smart FieldPackEditor.Net and is planned for release in a few days. A screencast will also be published next week.
If you skin your application with famous themes like Office 2007 (blue, black, silver), Office 2003 or Vista, you will be happy to know that SPG.Net now offers these themes too. Here is a (resized) screenshot:
This is feasible thanks to the Krypton Toolkit API (which is a free framework available here). Instead of reinventing the wheel, I contacted Phil Wright to learn more about his toolkit and I learnt that his assembly could be used only to skin custom controls. So I have just created a custom SPG drawing manager: KryptonDrawingManager.cs. It uses all the known themes of the toolkit and you can even design your own palettes.
A visitor who wanted to evaluate SPG asked me this question the other day: "I want to build a view to compare two objects visually. I want to display two property grids, one for each object. But these grids must be visually sync'ed. If user expands or collapses one property or category, other grid must do the same. If user scrolls, other must scroll too. It is possible with your component?". The answer is yes with SPG 3.0.1 and I have made a screencast to show you the result:
The synchronizer class can be downloaded here (please, let me know if you find any issue with this class, I will be happy to fix it).
Now that SFPE 1.1 has been released, better than a thousand words, here is a short screencast to showcase its new features:
Also here is the changelog:
A convenient latitude/longitude editor has been added to wrap LatLongFieldPacks. What makes it exceptional is that it accepts values as float, double, decimal and corresponding nullable types and it can even be given your own latitude/longitude type as long as it is IConvertible to decimal or an attached TypeConverter can make the conversion.
The latitude/longitude editor has a new inplace control for Smart PropertyGrid.
The latitude/longitude editor can display its value as deg.fraction, deg min.fraction or deg min sec.fraction, with the fraction being optional.
The IpAddress editor has a new inplace control for Smart PropertyGrid. It can be attached to a string or uint property type.
Field.Readonly is now handled (behaviour and ForeColor). A ReadOnly field can still be selected. If you don't want so, just set Field.Selectable to false.
FieldPackEditor.ReadonlyForeColor has been added.
DateTimeCustomFormatConverter has been set to the DateTimePicker.CustomFormat property so that it lists all standard format strings.
There is now a simple way to set any field pack to accept the delete key or not, to nullify its content. Call the AcceptsDeleteKey property on the supplied editors or more specifically on individual field packs. The SpgSfpeAdapter also provides an attribute (FieldPackAcceptsDeleteKeyAttribute).
The visibility of the checkbox, updown and dropdown buttons can now be set through the look class in Smart PropertyGrid.
A month name field can now be edited with a numeric value (typing 2 will give february).
Jumping to the next field can now be done with the blank key or the first letter/sign of the adjacent static field.
When an editor was inside Smart PropertyGrid, its value was not commited if the user was in the middle of typing in a field.
The up/down buttons were not effective when the user was in the middle of typing in a field.
Better detection of a separator in the datetime format string. There was a problem when the user was typing a separator char prefixed by another static field.
In an editor showing the time in 12h format with an AP/PM designator, changing the hour field could incorrectly change the AM/PM designator.
Then management of the temporary buffer used while typing in a field has been enhanced.
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:
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.
I know, VisualHint’s blog has been quiet for some time now, simply because internal activity has increased and the next version of SPG and SFPE are in the starting blocks. In the next days/weeks, you will see again that a lot is actually happening under the hood. Here are the next events at VisualHint:
SPG 3.0, which is already available as a preview for customers, will be published as a public beta as soon as I have updated the documentation. Here is a (resized) screenshot of the revamped supplied sample:
SFPE 1.1, which is already in beta, will be officially released.
I will often post here to explain what's new in both products. Expect some screencasts inside.