Overview

Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.Designers
Inheritance: BaseBeepControlDesigner

BeepAccordionMenuDesigner provides a rich design-time experience for the accordion sidebar menu control. It features adornment rendering — drawing empty-state hints ("Click 'Add Sample Items' to get started...") and preview-footers directly on the design surface — plus 6 designer verbs, 10 smart-tag properties, and 6 one-click style presets.

BeepAccordionMenuDesigner

MemberDescription
Initialize(component)Wires ListItems.ListChanged event, calls UpdateEmptyState()
Dispose(disposing)Unsubscribes ListChanged event
OnPaintAdornments(pe)Draws empty-state hint if no items, or preview footer if items exist
PreFilterProperties(dict)Hides Margin, ImeMode, AccessibleDescription/Name/Role from the Properties window

Designer Verbs (6)

VerbAction
Add Sample ItemsPopulates 3 sample sections: Dashboard (with Analytics/Monitoring children), Reports, and Settings (with Profile/Preferences children)
Toggle Expand/CollapseInverts the expanded state of all items
Expand AllExpands all accordion sections
Collapse AllCollapses all accordion sections
Apply Recommended SizesUses AccordionStyleHelpers to set ItemHeight and ChildItemHeight to style-appropriate values
Reset to DefaultsResets to Material3 style, standard sizes, clears all items

Adornment Rendering

Two visual hints drawn directly on the design surface:

  • Empty State — Dashed rectangle with text "Click 'Add Sample Items' to get started..." when the accordion has no items. This prevents a blank control from appearing confusing at design time.
  • Preview Footer — Small footer showing item count and current style name when items exist.

BeepAccordionMenuActionList — Smart-Tag

Properties (10)

PropertyTypeCategoryDescription
AccordionStyleAccordionStyleAppearanceVisual style (Material3, Modern, Classic, Minimal, iOS, Fluent2)
TitlestringAppearanceOptional title text above the menu
ItemHeightintLayoutHeight of parent-level items in px
ChildItemHeightintLayoutHeight of child-level items in px
ExpandedWidthintLayoutWidth when expanded
CollapsedWidthintLayoutWidth when collapsed
AutoScrollEnabledboolBehaviorEnable vertical scrolling for overflow
AutoFitHeightboolBehaviorAuto-size height to fit all items
AllowItemDragDropboolBehaviorAllow reordering items via drag-and-drop
HasItemIconsboolBehaviorShow icon column for items
AnimationStepintAnimationAnimation step interval in ms
AnimationDelayintAnimationAnimation delay before starting in ms

Style Presets (6 Methods)

ApplyMaterial3Style(), ApplyModernStyle(), ApplyClassicStyle(), ApplyMinimalStyle(), ApplyiOSStyle(), ApplyFluent2Style()

Item Actions (3 Methods)

AddSampleItems(), ExpandAll(), CollapseAll(). Plus SetRecommendedItemHeight().

Smart-Tag Sections (8 Sections)

SectionItems
StyleAccordionStyle property
Style Presets6 set-style methods
AppearanceTitle property + title method
LayoutItemHeight, ChildItemHeight, ExpandedWidth, CollapsedWidth
BehaviorAutoScrollEnabled, AutoFitHeight, AllowItemDragDrop, HasItemIcons
AnimationAnimationStep, AnimationDelay
ItemsAddSampleItems, ExpandAll, CollapseAll actions
Quick ActionsSetRecommendedItemHeight

Examples

// At design time, use the smart-tag:
// Smart-tag > Style Presets > "Apply Material 3 Style"
// Smart-tag > Items > "Add Sample Items"
// Smart-tag > Behavior > AllowItemDragDrop = true

// Equivalent at runtime:
var accordion = new BeepAccordionMenu();
accordion.AccordionStyle = AccordionStyle.Material3;
accordion.ExpandedWidth = 240;
accordion.CollapsedWidth = 56;
accordion.ItemHeight = 44;
accordion.AnimationStep = 150;
accordion.Items.Add(new AccordionItem("Dashboard", Icons.Dashboard,
    new List<AccordionItem> {
        new AccordionItem("Analytics", Icons.Chart),
        new AccordionItem("Monitoring", Icons.Monitor)
    }));