class1.cs

来自「對c#初學者參考..為課題asp.net 2.0教材代碼」· CS 代码 · 共 30 行

CS
30
字号
public class TestControlDesigner : ControlDesigner
{
    public override DesignerActionListCollection ActionLists
    {
        get
        {
            DesignerActionListCollection actionLists =
                new DesignerActionListCollection();
            actionLists.AddRange(base.ActionLists);
            actionLists.Add(new TestControlList(this));
            return actionLists;
        }
    }

    private sealed class TestControlList : DesignerActionList
    {
        public TestControlList(TestControlDesigner c)
            : base(c.Component)
        {
        }

        public override DesignerActionItemCollection GetSortedActionItems()
        {
            DesignerActionItemCollection c = new DesignerActionItemCollection();
            c.Add(new DesignerActionTextItem("FOO", "FOO"));
            return c;
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?