Tuesday, 30 December 2008 03:45 by
Bill Henning (Actipro)
In addition to our work on SyntaxEditor for WPF, we are also actively building Editors for WPF. We previously announced that this product is going to include a parts-based editor, which will simplify data entry for various data types such as DateTime. We have completed most of the core functionality needed for building and presenting the various parts. We have also completed much of the work needed for a DateTime-specific implementation.
|

A DateTimeEditBox with a focus rectangle around the date group
|
In the image above, there are two groups (one for the Date and one for the Time) seperated by the literal text "at" inside the DateTimeEditBox. Both groups include several parts, such as month, day, and year. Each part can then present, modify, or validate it's data independently. This allows the day part to be restricted to 28/29, 30, or 31 depending on the current month. Additionally, this allows the user to update the month and have the day automatically corrected. For example, if the current date is "1/31/2009" and the month is changed to 2, then the current date would be updated to "2/28/2009".
By default, the DateTimeEditBox will build and configure the groups/parts based on easy-to-use properties. More complex setups can be accomplished as needed by using the groups/parts directly in a custom parts-editor. Additionally, since each group/part is ultimately a WPF control, you can style them like any other control. This gives you more control over the look and feel of the groups/parts.
We intend to provide specific implementations of the parts-based editor for several .Net types, including DateTime, IPAddress, Color, Size, and more. If you would like to see a parts-based editor for a specific .NET type, please let us know now. Of course, you can always leverage the infrastructure we are building for any custom types you may have.
We’ll post some more screenshots in the coming weeks as progress is made on specific implementations.