Exemplo n.º 1
0
        public override DesignerActionItemCollection GetSortedActionItems()
        {
            this.AddHeaderItem(new DesignerActionHeaderItem("Actions", "600"));

            DesignerActionMethodItem add    = new DesignerActionMethodItem(this, "AddPanel", "Add Panel", "600");
            DesignerActionMethodItem remove = new DesignerActionMethodItem(this, "RemovePanel", "Remove panel", "600", "Remove active panel");
            Accordion layout = (Accordion)this.Control;

            this.AddMethodItem(add);
            if (layout.ExpandedPanelIndex > -1)
            {
                this.AddMethodItem(remove);
            }
            else
            {
                this.RemoveMethodItem(remove);
            }

            return(base.GetSortedActionItems());
        }
Exemplo n.º 2
0
 public override void Initialize(System.ComponentModel.IComponent component)
 {
     base.Initialize(component);
     this.SetViewFlags(ViewFlags.TemplateEditing, true);
     this.layout = (Accordion)component;
 }