mcpField
S
syncfusion-wpf-dropdownbuttonadv

syncfusion-wpf-dropdownbuttonadv

github.com/syncfusionDesign & UI5155 installsUpdated 1w ago
Repository

About syncfusion-wpf-dropdownbuttonadv

A reference skill for implementing Syncfusion’s DropDownButtonAdv in WPF applications. It covers menu construction, MVVM binding, popup behavior, events, and appearance customization.

Key features

  1. 01Static and data-bound menu items
  2. 02MVVM command binding
  3. 03Configurable popup direction and resizing
  4. 04Checkable items and custom menu content
  5. 05Themes, icons, and multiline labels

Use cases

  1. 01Build a dropdown for choosing options
  2. 02Bind menu entries to ViewModel data
  3. 03Configure popup placement and resizing
  4. 04Handle menu open, close, and item events

Install

Copy the command and run it in a terminal.

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

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

Bundled files

References and scripts installed along with SKILL.md.

references/
command-binding.md
data-binding.md
dropdown-behavior.md
dropdown-menu-items.md
events-and-appearance.md
getting-started.md

Details

From the project README

Implementing WPF DropDownButtonAdv

The DropDownButtonAdv is a WPF dropdown button control that displays a popup menu when the arrow is clicked. It supports menu items with icons, data binding, command binding, configurable popup direction, resizing, multiline text, and full theme support.

Assembly: Syncfusion.Shared.WPF
Namespace: Syncfusion.Windows.Tools.Controls
XAML Schema: xmlns:syncfusion="http://schemas.syncfusion.com/wpf"

When to Use This Skill

  • User wants a button that opens a dropdown list of options
  • User needs a WPF dropdown button with icons, checkable items, or grouped items
  • User asks about DropDownButtonAdv, DropDownMenuGroup, DropDownMenuItem
  • User needs MVVM binding for dropdown menu items or command binding
  • User needs to control popup direction, resizing, or multiline label
  • User asks how to handle dropdown open/close events or item click events

Quick Start

xmlns:syncfusion="http://schemas.syncfusion.com/wpf"

<syncfusion:DropDownButtonAdv Label="Country" SizeMode="Normal" SmallIcon="Images/flag.png">
    <syncfusion:DropDownMenuGroup>
        <syncfusion:DropDownMenuItem HorizontalAlignment="Left" Header="India">
            <syncfusion:DropDownMenuItem.Icon>
                <Image Source="Images/india.png"/>
            </syncfusion:DropDownMenuItem.Icon>
        </syncfusion:DropDownMenuItem>
        <syncfusion:DropDownMenuItem HorizontalAlignment="Left" Header="France"/>
        <syncfusion:DropDownMenuItem HorizontalAlignment="Left" Header="Germany"/>
    </syncfusion:DropDownMenuGroup>
</syncfusion:DropDownButtonAdv>
// C# equivalent
DropDownButtonAdv button = new DropDownButtonAdv();
button.Label = "Country";
button.SizeMode = SizeMode.Normal;
button.SmallIcon = new BitmapImage(new Uri("Images/flag.png", UriKind.RelativeOrAbsolute));
DropDownMenuGroup menu = new DropDownMenuGroup();
menu.Items.Add(new DropDownMenuItem { Header = "India", HorizontalAlignment = HorizontalAlignment.Left });
button.Content = menu;

Common Patterns

GoalApproach
Static menu itemsDeclare DropDownMenuItem directly inside DropDownMenuGroup
Dynamic items from dataBind DropDownMenuGroup.ItemsSource + use ItemTemplate
MVVM command on item clickSet Command + CommandParameter on DropDownMenuItem
Popup opens below-leftDropDirection="BottomLeft" (default)
Large button with label wrappingSizeMode="Large" + IsMultiLine="True"
Checkable itemsIsCheckable="True" on DropDownMenuItem
Custom UIElement in menuUse DropDownMenuGroup.MoreItems property
Scrollable long listSet MaxHeight + ScrollBarVisibility="Visible" on group
Resizable popupIsResizable="True" on DropDownMenuGroup

Key Properties

PropertyTypeDescription
LabelstringButton text label
SizeModeSizeModeSmall / Normal / Large
SmallIconImageSourceIcon for Small and Normal modes
LargeIconImageSourceIcon for Large mode
IconTemplateDataTemplateVector/path icon template (overrides image icons)
IconTemplateSelectorDataTemplateSelectorConditionally select icon template
IconWidth / IconHeightdoubleIcon dimensions
DropDirectionDropDirectionPopup position (default: BottomLeft)
IsMultiLineboolMulti-line label (Large mode only)
DropDownMenuGroup.ItemsSourceIEnumerableData-bound menu items
DropDownMenuGroup.IconBarEnabledboolShow vertical icon bar
DropDownMenuGroup.ScrollBarVisibilityScrollBarVisibilityScrollbar in popup
DropDownMenuGroup.IsResizableboolResize gripper on popup
DropDownMenuGroup.MoreItemsObservableCollection<UIElement>Custom bottom items
DropDownMenuItem.IsCheckableboolAllow check/uncheck
DropDownMenuItem.CommandICommandMVVM command
DropDownMenuItem.CommandParameterobjectCommand parameter

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

  • Assembly reference (Syncfusion.Shared.WPF)
  • Add via designer, XAML, or C#
  • Setting Label, SizeMode (Small/Normal/Large)
  • SmallIcon, LargeIcon, IconWidth/IconHeight
  • IconTemplate and IconTemplateSelector
  • Basic menu items inline
  • Applying themes with SfSkinManager
Dropdown Menu Items

📄 Read: references/dropdown-menu-items.md

  • DropDownMenuGroup as the container element
  • Declarative DropDownMenuItem with Header and Icon
  • IconBarEnabled (vertical icon strip)
  • ScrollBarVisibility for long item lists
  • IsResizable gripper for popup resize
  • IsCheckable / IsChecked for checkable items
  • MoreItems for custom UIElement additions
  • IsMoreItemsIconTrayEnabled
Data Binding

📄 Read: references/data-binding.md

  • Model and ViewModel pattern
  • Binding DropDownMenuGroup.ItemsSource
  • ItemTemplate with DataTemplate
  • Binding DropDownMenuItem.Command from ViewModel via x:Reference
  • Full MVVM example with DelegateCommand<T>
  • When to use data binding vs declarative items
Command Binding

📄 Read: references/command-binding.md

  • Command and CommandParameter on DropDownMenuItem
  • DelegateCommand<T> implementation
  • CanExecute and CanPerformAction toggle pattern
  • Binding to ViewModel commands in declarative XAML
  • Gotchas: scoping commands in DataTemplates
Dropdown Behavior

📄 Read: references/dropdown-behavior.md

  • DropDirection enum: Left, Right, BottomLeft, BottomRight, TopLeft, TopRight
  • Default direction is BottomLeft
  • IsMultiLine for wrapping long labels (Large mode only)
  • FlowDirection for RTL support
Events & Appearance

📄 Read: references/events-and-appearance.md

  • DropDownOpening / DropDownOpened events (cancel support)
  • DropDownClosing / DropDownClosed events
  • DropDownMenuItem.Click event
  • DropDownMenuItem.IsCheckedChanged event
  • Editing control template in Expression Blend or Visual Studio
  • SfSkinManager themes + ThemeStudio custom themes

Comments

Markdown supported