BeepMenuBarActionList
Smart-tag for BeepMenuBar -- 5 properties, 8 quick actions (style presets, height presets, load/clear items), 4 organized sections
Table of Contents
Overview
Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.Designers
Inheritance: DesignerActionList | Visibility: public sealed
BeepMenuBarActionList provides the connected smart-tag for BeepMenuBar. It directly couples to BeepMenuBarDesigner and uses its transaction-wrapped mutation methods (ExecuteAction, SetPropertyWithTransaction) for all state changes. With 5 properties and 8 action methods across 4 organized sections, it provides a compact but complete design-time configuration surface.
Smart-Tag Properties (5)
| Property | Type | Category | Read-Only | Description |
|---|---|---|---|---|
| ItemCount | int | Items | Yes | Number of top-level menu items currently registered |
| ControlStyle | BeepControlStyle | Style | No | Visual style of menu items. Delegates to designer's GetProperty/SetPropertyWithTransaction. |
| Height | int | Layout | No | Menu bar height in pixels. Delegates to designer. |
| TextFont | Font? | Appearance | No | Font for menu item text. Delegates to designer. |
| ShowImage | bool | Appearance | No | Toggle per-item image/icon column visibility |
Action Methods (8)
| Method | Category | Description |
|---|---|---|
| LoadSampleMenuItems() | Items | Populates the menu bar with a representative sample tree: File > New/Open/Save/Exit, Edit > Undo/Redo/Cut/Copy/Paste, Help > About |
| ClearAllItems() | Items | Removes every top-level item |
| SetMaterialStyle() | Style | ControlStyle = Material3 |
| SetFluentStyle() | Style | ControlStyle = Fluent2 |
| SetOfficeStyle() | Style | ControlStyle = Office |
| SetStandardHeight() | Layout | Height = 44 px |
| SetCompactHeight() | Layout | Height = 32 px |
| SetComfortableHeight() | Layout | Height = 56 px |
Smart-Tag Sections (4 Sections, 16 Items)
| Section | Items |
|---|---|
| Items | LoadSampleMenuItems (action), ClearAllItems (action), ItemCount (read-only property) |
| Style | SetMaterialStyle (action), SetFluentStyle (action), SetOfficeStyle (action), ControlStyle (property) |
| Layout | SetStandardHeight (action), SetCompactHeight (action), SetComfortableHeight (action), Height (property) |
| Appearance | TextFont (property), ShowImage (property) |
Examples
// At design time, use smart-tag:
// Smart-tag > Items > "Load Sample Items"
// Smart-tag > Style > "Set Material 3 Style"
// Smart-tag > Layout > "Standard (44 px)"
// Smart-tag > Appearance > ShowImage = true
// The action list calls through BeepMenuBarDesigner:
// _designer.ExecuteAction("Load menu items", mb => { ... });
// _designer.SetPropertyWithTransaction("ControlStyle", Material3, "Set style");