Share on Facebook
This week I've been designing a few custom web controls for a development framework here in Iceberg, and I added smart tags to them… it's very easy to do, and it gives them a very professional look.
The first step is to decorate your control class with the Designer attribute, and pass the type of the class that will handle the smart tags, like so
That's all the modification to the control class itself.
Then you have to provide the designer class, which unless you have specific needs, would look like this:
The final step is to provide the action list itself. All you have to do is provide a constructor to receive the component and call the base constructor with it, and override the GetSortedActionItems method and provide the list, like so
Also you have to provide a property in this class to receive the value entered by the developer and set it to the control, it has to match the first parameter of the DesignerActionPropertyItem constructor.
And depending how you designed your control, you'd get something like this
You can find source code in the article I used as a starting point