asp.net control design-time Support (3)

Source: Internet
Author: User

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;
}
}

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.