Skip to content

syncfusion/wpf-ui-components-skills / skills/syncfusion-wpf-menu

syncfusion-wpf-menu

Verified

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.

Implementing MenuAdv (WPF)

When to Use This Skill

Use this skill when the user needs to:

  • Build an application menu bar (File, Edit, View…) with nested submenus
  • Add icons, keyboard shortcut labels, or separators to menu items
  • Create checkable menu items (checkbox or radio button style)
  • Bind a hierarchical data collection to a menu via ItemsSource
  • Wire menu items to ICommand implementations (MVVM pattern)
  • Switch between horizontal and vertical menu orientation
  • Control how submenus open (click vs mouse-hover)

Component Overview

MenuAdv                               (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)

Assembly: Syncfusion.Shared.WPF
Namespace: Syncfusion.Windows.Shared
XAML schema: http://schemas.syncfusion.com/wpf


Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly reference and NuGet
  • XAML namespace declaration
  • Declarative nested MenuItemAdv in XAML
  • C# code-behind creation
  • Setting icons on items
  • Themes with SfSkinManager

Data Binding

📄 Read: references/data-binding.md

  • Binding ObservableCollection via ItemsSource
  • Model + ViewModel with SubItems hierarchy
  • HierarchicalDataTemplate setup
  • Binding from XML via XmlDataProvider + XPath

Menu Item Features

📄 Read: references/menu-item-features.md

  • Icons on MenuItemAdv
  • InputGestureText (keyboard shortcut labels)
  • MenuItemSeparator (visual divider)
  • CheckBox menu items (IsCheckable, CheckIconType)
  • RadioButton menu items (GroupName for mutual exclusion)

Commands

📄 Read: references/commands.md

  • Command property — binding to ICommand
  • CommandParameter — value passed to handler
  • CommandTarget — routing to a specific element
  • Built-in ApplicationCommands (Copy, Cut, Paste)
  • DelegateCommand implementation pattern for MVVM

Orientation and Expand Mode

📄 Read: references/orientation-and-expand-mode.md

  • Orientation — Horizontal (default) vs Vertical
  • ExpandMode — ExpandOnClick vs ExpandOnMouseOver
  • Boundary detection and scroll support overview
  • Decision guide

Appearance

📄 Read: references/appearance.md

  • Animation support
  • Keyboard navigation
  • Blendability (Expression Blend customization)
  • Themes via SfSkinManager and ThemeStudio

Quick Start

xmlns: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;

Common Patterns

ScenarioApproach
Static app menu (File/Edit/View)Declarative nested MenuItemAdv in XAML
Dynamic data-driven menuItemsSource + HierarchicalDataTemplate
Icon beside menu itemMenuItemAdv.Icon with <Image Source="..."/>
Keyboard shortcut labelInputGestureText="Ctrl+N"
Separator between groups<syncfusion:MenuItemSeparator/>
Toggle option (checkable)IsCheckable="True" + CheckIconType="CheckBox"
Mutually exclusive optionsCheckIconType="RadioButton" + GroupName="group1"
MVVM command bindingCommand="{Binding SaveCommand}"
Vertical sidebar menuOrientation="Vertical"
Open submenu on hoverExpandMode="ExpandOnMouseOver"

Key Properties

MenuAdv:

PropertyDescription
OrientationHorizontal (default) or Vertical item layout
ExpandModeExpandOnClick or ExpandOnMouseOver
ItemsSourceData collection for data-bound population
ItemTemplateHierarchicalDataTemplate for data-bound items

MenuItemAdv:

PropertyDescription
HeaderDisplay text
IconImage/UIElement shown on left
InputGestureTextShortcut key label (e.g., "Ctrl+S")
IsCheckableEnable checkbox/radio behavior
CheckIconTypeCheckBox or RadioButton
IsCheckedChecked state (bool)
GroupNameRadio button group identifier
CommandICommand binding
CommandParameterValue passed to command
CommandTargetTarget element for routed commands
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall