Loading...
Loading...
Implement Syncfusion WPF MenuAdv for hierarchical menus, context menus, and application menu bars. Use this when building nested menus, menus with icons, keyboard shortcuts, checkbox/radio button menu items, or command-bound menus in WPF. Covers ItemsSource data binding with HierarchicalDataTemplate, MenuItemSeparator, orientation, expand mode, animation, and theming.
npx skill4agent add syncfusion/wpf-ui-components-skills syncfusion-wpf-menuMenuAdv (root menu bar container)
├── MenuItemAdv (×N) (top-level or nested item)
│ ├── Header — display text
│ ├── Icon — image/UIElement on left
│ ├── InputGestureText — shortcut label (e.g. "Ctrl+N")
│ ├── IsCheckable / CheckIconType — checkbox or radio button mode
│ ├── Command / CommandParameter — ICommand binding
│ └── MenuItemAdv (×N) (nested submenu items)
└── MenuItemSeparator (horizontal divider line)Syncfusion.Shared.WPFSyncfusion.Windows.Sharedhttp://schemas.syncfusion.com/wpfxmlns:syncfusion="http://schemas.syncfusion.com/wpf"
<syncfusion:MenuAdv Height="25" VerticalAlignment="Top">
<syncfusion:MenuItemAdv Header="File">
<syncfusion:MenuItemAdv Header="New"/>
<syncfusion:MenuItemAdv Header="Open"/>
<syncfusion:MenuItemSeparator/>
<syncfusion:MenuItemAdv Header="Exit"/>
</syncfusion:MenuItemAdv>
<syncfusion:MenuItemAdv Header="Edit">
<syncfusion:MenuItemAdv Header="Cut"/>
<syncfusion:MenuItemAdv Header="Copy"/>
<syncfusion:MenuItemAdv Header="Paste"/>
</syncfusion:MenuItemAdv>
<syncfusion:MenuItemAdv Header="View"/>
</syncfusion:MenuAdv>using Syncfusion.Windows.Shared;
MenuAdv menu = new MenuAdv();
MenuItemAdv file = new MenuItemAdv { Header = "File" };
file.Items.Add(new MenuItemAdv { Header = "New" });
file.Items.Add(new MenuItemAdv { Header = "Open" });
file.Items.Add(new MenuItemSeparator());
file.Items.Add(new MenuItemAdv { Header = "Exit" });
MenuItemAdv edit = new MenuItemAdv { Header = "Edit" };
edit.Items.Add(new MenuItemAdv { Header = "Cut" });
edit.Items.Add(new MenuItemAdv { Header = "Copy" });
menu.Items.Add(file);
menu.Items.Add(edit);
this.Content = menu;| Scenario | Approach |
|---|---|
| Static app menu (File/Edit/View) | Declarative nested |
| Dynamic data-driven menu | |
| Icon beside menu item | |
| Keyboard shortcut label | |
| Separator between groups | |
| Toggle option (checkable) | |
| Mutually exclusive options | |
| MVVM command binding | |
| Vertical sidebar menu | |
| Open submenu on hover | |
| Property | Description |
|---|---|
| |
| |
| Data collection for data-bound population |
| |
| Property | Description |
|---|---|
| Display text |
| Image/UIElement shown on left |
| Shortcut key label (e.g., |
| Enable checkbox/radio behavior |
| |
| Checked state (bool) |
| Radio button group identifier |
| |
| Value passed to command |
| Target element for routed commands |