/syncfusion-winforms:syncfusion-winforms-popup-menufrom Syncfusion WinForms Controls
Guide for implementing Syncfusion PopupMenu control for context menus in Windows Forms applications. Use this when creating right-click menus, multi-level menu hierarchies, or keyboard shortcuts. Covers PopupMenu implementation with BarItems, PopupMenusManager integration, and Bar Manager association for building professional context menu systems.
Ships in Syncfusion WinForms Controls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill provides comprehensive guidance for implementing the Syncfusion PopupMenu control in Windows Forms applications. PopupMenu represents a context menu that appears on user interaction, supporting multiple BarItem types, multi-level hierarchies, keyboard navigation, and integration with Bar Manager.
Use this skill when the user:
PopupMenu is a context menu control that remains hidden by default and displays over any control when triggered (typically by right-click). It supports rich menu structures with seven types of BarItems, multi-level nesting, visual customization, and comprehensive keyboard/touch interaction.
Key Features:
Core Components:
📄 Read: references/getting-started.md
📄 Read: references/baritem-types.md
📄 Read: references/multilevel-menus.md
📄 Read: references/grouping-baritems.md
📄 Read: references/baritem-states.md
📄 Read: references/images-and-tooltips.md
📄 Read: references/keyboard-interaction.md
📄 Read: references/advanced-features.md
📄 Read: references/troubleshooting.md
using Syncfusion.Windows.Forms.Tools.XPMenus;
using System.Windows.Forms;
public partial class Form1 : Form
{
private PopupMenu popupMenu1;
private ParentBarItem parentBarItem1;
private BarItem barItem1;
private BarItem barItem2;
private BarItem barItem3;
private PopupMenusManager popupMenusManager1;
private RichTextBox richTextBox1;
public Form1()
{
InitializeComponent();
// Initialize components
this.popupMenu1 = new PopupMenu(this.components);
this.parentBarItem1 = new ParentBarItem();
this.barItem1 = new BarItem();
this.barItem2 = new BarItem();
this.barItem3 = new BarItem();
this.richTextBox1 = new RichTextBox();
this.popupMenusManager1 = new PopupMenusManager(this.components);
// Configure popup menu
this.popupMenu1.ParentBarItem = this.parentBarItem1;
// Configure BarItems
this.barItem1.Text = "Cut";
this.barItem1.Shortcut = Shortcut.CtrlX;
this.barItem1.Click += BarItem1_Click;
this.barItem2.Text = "Copy";
this.barItem2.Shortcut = Shortcut.CtrlC;
this.barItem2.Click += BarItem2_Click;
this.barItem3.Text = "Paste";
this.barItem3.Shortcut = Shortcut.CtrlV;
this.barItem3.Click += BarItem3_Click;
// Add items to parent
this.parentBarItem1.Items.AddRange(new BarItem[] {
this.barItem1, this.barItem2, this.barItem3
});
this.parentBarItem1.SizeToFit = true;
// Associate with control
this.richTextBox1.Size = new System.Drawing.Size(300, 200);
this.popupMenusManager1.SetXPContextMenu(this.richTextBox1, this.popupMenu1);
// Add to form
this.Controls.Add(this.richTextBox1);
}
private void BarItem1_Click(object sender, EventArgs e)
{
if (richTextBox1.SelectionLength > 0)
{
richTextBox1.Cut();
}
}
private void BarItem2_Click(object sender, EventArgs e)
{
if (richTextBox1.SelectionLength > 0)
{
richTextBox1.Copy();
}
}
private void BarItem3_Click(object sender, EventArgs e)
{
richTextBox1.Paste();
}
}
// Create hierarchy: File → New → New Project, New Website
ParentBarItem fileMenu = new ParentBarItem();
fileMenu.Text = "File";
ParentBarItem newSubmenu = new ParentBarItem();
newSubmenu.Text = "New";
BarItem newProject = new BarItem();
newProject.Text = "New Project...";
newProject.Click += NewProject_Click;
BarItem newWebsite = new BarItem();
newWebsite.Text = "New Website...";
newWebsite.Click += NewWebsite_Click;
// Build hierarchy
newSubmenu.Items.AddRange(new BarItem[] { newProject, newWebsite });
fileMenu.Items.Add(newSubmenu);
parentBarItem1.Items.Add(fileMenu);
// Create menu items
BarItem cut = new BarItem { Text = "Cut" };
BarItem copy = new BarItem { Text = "Copy" };
BarItem paste = new BarItem { Text = "Paste" };
BarItem selectAll = new BarItem { Text = "Select All" };
// Add items
parentBarItem1.Items.AddRange(new BarItem[] { cut, copy, paste, selectAll });
// Add separator after index 2 (after Paste)
parentBarItem1.SeparatorIndices.Add(2);
// Alternative: Use method
parentBarItem1.BeginGroupAt(selectAll);
BarItem wordWrap = new BarItem();
wordWrap.Text = "Word Wrap";
wordWrap.Checked = true; // Initial state
wordWrap.Click += (s, e) =>
{
wordWrap.Checked = !wordWrap.Checked; // Toggle
richTextBox1.WordWrap = wordWrap.Checked; // Apply setting
};
BarItem saveItem = new BarItem();
saveItem.Text = "Save";
saveItem.Image = new ImageExt(Image.FromFile(@"icons\save.png"));
saveItem.DisabledImage = new ImageExt(Image.FromFile(@"icons\save_disabled.png"));
saveItem.HighlightedImage = new ImageExt(Image.FromFile(@"icons\save_highlight.png"));
saveItem.Shortcut = Shortcut.CtrlS;
saveItem.Tooltip = "Save the current document";
saveItem.ShowToolTipInPopUp = true;
// Enable partial menus
parentBarItem1.UsePartialMenus = true;
// Mark items as frequently used (visible by default)
cutItem.IsRecentlyUsedItem = true;
copyItem.IsRecentlyUsedItem = true;
pasteItem.IsRecentlyUsedItem = true;
// Mark items as less frequently used (hidden initially)
advancedItem.IsRecentlyUsedItem = false;
optionsItem.IsRecentlyUsedItem = false;
Create a context menu for RichTextBox with Cut, Copy, Paste, Select All, and formatting options.
Add context menu to grid with options like Add Row, Delete Row, Edit Cell, Export Data, etc.
Implement Windows Explorer-style context menu with Open, Copy, Delete, Properties, and nested submenus.
Add context menu to buttons, labels, or panels with control-specific actions.
Integrate PopupMenu with Bar Manager for consistent menu experience across the application.
Use BeforePopup event to customize menu items based on application state (enable/disable items, show/hide options).
Leverage built-in touch support for tablet and touch-screen applications.
BarItem Type Selection:
Performance:
Accessibility:
Designer vs Code:
For detailed implementation guidance, navigate to the reference files listed in the Documentation and Navigation Guide section.
references/advanced-features.md (opens in a new tab)references/baritem-states.md (opens in a new tab)references/baritem-types.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/grouping-baritems.md (opens in a new tab)references/images-and-tooltips.md (opens in a new tab)references/keyboard-interaction.md (opens in a new tab)references/multilevel-menus.md (opens in a new tab)references/troubleshooting.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-winforms113 skills in this plugin
/syncfusion-winforms-ai-assistviewGuide for implementing Syncfusion Windows Forms AI AssistView (SfAIAssistView) for building conversational AI interfaces in desktop applications. Use this when creating chat interfaces, AI assistants, or chatbots with Windows Forms. Supports OpenAI and Azure OpenAI integration, typing indicators, chat suggestions, message bubbles, custom views, input toolbar with attachments, response toolbar actions, and stop responding for interactive messaging experiences./syncfusion-winforms-autocompleteGuides implementation of the Syncfusion WinForms AutoComplete control for text input with auto-suggestion functionality. Use when users want to add autocomplete textboxes, implement auto-suggestion features, create search boxes with suggestions, enable URL/email autocomplete, or build type-ahead search functionality in Windows desktop applications. Covers data binding, customization, filtering, multi-column dropdowns, events, and all AutoComplete-specific features./syncfusion-winforms-autolabelGuides implementation of the Syncfusion WinForms AutoLabel control for automatic label positioning with form controls. Use when users want to add labels that automatically reposition when controls move, create form layouts with paired label-control units, implement complex form designs with FlowLayout, or ensure labels stay synchronized with their associated controls. Covers labeling controls, positioning, spacing, size settings, theming, and events.Other plugins' skills for the same job