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()); }
public override void Initialize(System.ComponentModel.IComponent component) { base.Initialize(component); this.SetViewFlags(ViewFlags.TemplateEditing, true); this.layout = (Accordion)component; }