public override DesignerActionItemCollection GetSortedActionItems()
{
// Create a new collection for holding the single item we want to create
DesignerActionItemCollection actions = new DesignerActionItemCollection();
// This can be null when deleting a control instance at design time
if (_headerGroup != null)
{
// Get the current visible state of the headers
bool header1Visible = _headerGroup.HeaderVisiblePrimary;
bool header2Visible = _headerGroup.HeaderVisibleSecondary;
// Decide on the initial text values
_text1 = (header1Visible ? "Hide primary header" : "Show primary header");
_text2 = (header2Visible ? "Hide secondary header" : "Show secondary header");
// Create the two verbs for toggling the header visibility
_visible1 = new DesignerVerb(_text1, new EventHandler(OnVisibleClick));
_visible2 = new DesignerVerb(_text2, new EventHandler(OnVisibleClick));
// Add the list of panel specific actions
actions.Add(new DesignerActionHeaderItem("Appearance"));
actions.Add(new DesignerActionPropertyItem("GroupBackStyle", "Back style", "Appearance", "Background style"));
actions.Add(new DesignerActionPropertyItem("GroupBorderStyle", "Border style", "Appearance", "Border style"));
actions.Add(new DesignerActionHeaderItem("Primary Header"));
actions.Add(new KryptonDesignerActionItem(_visible1, "Primary Header"));
actions.Add(new DesignerActionPropertyItem("HeaderStylePrimary", "Style", "Primary Header", "Primary header style"));
actions.Add(new DesignerActionPropertyItem("HeaderPositionPrimary", "Position", "Primary Header", "Primary header position"));
actions.Add(new DesignerActionHeaderItem("Secondary Header"));
actions.Add(new KryptonDesignerActionItem(_visible2, "Secondary Header"));
actions.Add(new DesignerActionPropertyItem("HeaderStyleSecondary", "Style", "Secondary Header", "Secondary header style"));
actions.Add(new DesignerActionPropertyItem("HeaderPositionSecondary", "Position", "Secondary Header", "Secondary header position"));
actions.Add(new DesignerActionHeaderItem("Visuals"));
actions.Add(new DesignerActionPropertyItem("PaletteMode", "Palette", "Visuals", "Palette applied to drawing"));
}
return actions;
}