Putting the final, professional touches on your UserControl - “How to use UITypeEditors, Smart Tags, ControlDesigner Verbs, and Expandable Properties to make Design Time editing easier.”
CodeProject - Rich Design Time Editing with UITypeEditors (VB.NET)
“IntroductionThis article assumes you have basic knowledge on creating a simple UserControl, so I am not going to go into much detail on creating one here. To demonstrate the Property Editors I desided to make a control that draws itself in a selected shape. This gave me lots of options to demonstrate different design time editors. This Demo uses UITypeEditors, Smart Tags, ControlDesigner Verbs, and Expandable Properties.
…
Another example of the DropDown is the
RadiusInnerTypeEditor
. It uses theDropdownRadiusInner
UserControl, which contains aTrackBar
and aShape
Control. If theShape
is a Star sliding theTrackBar
back and forth changes theRadiusInner
property value on the star shape. When you get it the way you want, Check the Apply button to callCloseDropDown
The last Dropdown is the
BlendTypeEditor
. It uses theDropdownColorBlender
UserControl, which is a slight variation on my ColorBlender UserControl[^] The UserControl may be more complex but there is very little difference in theEditValue
Method.…”
This is a great article/project on adding professional finish to a UserControl via rich design time editing features. Having all these things, UITypeEditors, Verbs, etc, in a single article is very nice. I thought the article was well written, with a good mix of images, copy and code snips.
If you’re doing UserControls and have been hesitant to provide rich propertygrid UI Type Editors because they seemed “hard”, then take a look at this…
No comments:
Post a Comment