mcpField
S
syncfusion-wpf-menu

syncfusion-wpf-menu

github.com/syncfusionDevelopment5159 installsUpdated 1w ago
Repository

About syncfusion-wpf-menu

A skill for building Syncfusion MenuAdv menus in WPF, covering nested items, data binding, and MVVM commands. It also documents appearance and interaction settings.

Key features

  1. 01Create nested menu items
  2. 02Bind hierarchical data collections
  3. 03Configure icons and shortcut labels
  4. 04Add checkable and radio items
  5. 05Bind ICommand commands
  6. 06Set orientation and submenu behavior

Use cases

  1. 01Build File and Edit application menus
  2. 02Generate menus from data sources
  3. 03Handle menu actions with MVVM commands

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/wpf-ui-components-skills --skill syncfusion-wpf-menu

After installing, type/syncfusion-wpf-menuin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
appearance.md
commands.md
data-binding.md
getting-started.md
menu-item-features.md
orientation-and-expand-mode.md

Details

From the project README

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

Comments

Markdown supported