The last article is very lazy to write the automatic format settings.
To fill up the unfinished story.
I. Smart Tags
Look at a picture first.
The small triangle on the right side of the GridView can easily help us set up commonly used properties, such as the following startup paging, enabling sorting, and so on, we can quickly finish the work in this way. We call such a task menu a smart tag.
Let's look at how to implement
1. Rewrite the Actionlists property of ControlDesigner
You have to rewrite this property and return to your custom smart tag collection (that is, designeractionlistcollection), where you assume that Customcontrolactionlist is a custom smart
public class Samplecontroldesigner:controldesigner
{public
Samplecontroldesigner ()
: Base ()
{
}
//Create a Custom Action list collection public
override DesignerActionListCollection actionlists
{
Get
{
designeractionlistcollection actionlists = new DesignerActionListCollection ();
Actionlists.add (This) (new customcontrolactionlist);
return actionlists;
}
}