For a long time I was wandering how easy and comfortable to work with smart tags. Actually I didn’t knew how it was called officially, but anyway I thought (and still think) that this feature is awesome! Some time ago I’ve started to develop my own components and also spend more time tuning user’s interface. I found that it’s very time consuming and boring to setup necessary properties from the Property view. Its okay to setup few controls in little program, but when you have over 30 complicated views with custom components – you quickly became in a sad mood. So I decide found out how to create for my controls those pretty little triangles on the top right corner at the most standard components.
I found articles, books; I performed several tests and finally made what I want. And you know, it’s really helps me with development! Time saving in action! )
Now I’d like to share how to make it from the very beginning.
For all described actions below I used VS2008, ReSharper5
What is smart tag?
Smart tags are menu-like user interface (UI) elements that supply commonly used design-time options. Most of the standard components and controls provided with the .NET Framework contain smart tag and designer verb enhancements.
You can find three main parts in a smart tag:
- Verbs – looks like link and perform some immediate action with control;
- Fields – there are may be many different editor types as on figure. String editor, image, binding, date.
- Text – just a simple text for information or for something not editable.
Performing changes in smart tag, you change underlying control at the same time.