Trusted by the world’s leading companies
Overview
The WinForms context menu component displays a list of shortcut options during user interactions such as a right-click mouse action.
Associating menu with other controls
You can easily add menus displaying appropriate shortcut options with any control.
Design experience
Allows users to add items to the menu effortlessly, creating either a simple or complex menu through designer or code-behind with a seamless navigation experience.
ToolStripMenuItem Types
Menu item
The default option to select menu items displayed in the control.
Combo box
Displays a combo box in the menu item and behaves exactly in its native way.
Text box
Displays a text box in the menu item and behaves exactly in its native way.
Separator
A static line that groups menu items based on their behavior.
Display image in menu items
Images can be displayed along with text in the menu item, providing a rich look and feel.
Checked/unchecked menu items
In order to indicate the state of the menu item, a check/uncheck option is provided.
Disabled menu items
Menu item view can be disabled easily if needed.
Header text
Allows users to set relevant captions for the control. Usually the caption set will be displayed at the top of the control.
Runtime support
Auto close
Let’s the context menu close automatically when users click on any other items in the window.
Tooltip
Provides basic information about a menu item while hovering the mouse pointer over it.
Custom style and themes
Built-in themes
The WinForms context menu control ships with built-in themes like Office 2016 - colorful, white, black, and dark grey along with Metro.
Custom style
Customize the appearance of the control to any extent programmatically.
Localization
Allows users to customize the text in the user interface based on the local culture.
Right-to-left (RTL)
The text direction and layout of the control can be displayed in right-to-left (RTL) orientation.
WinForms ContextMenuStrip Code Example
Easily get started with the WinForms ContextMenuStrip using a few simple lines of C# code example as demonstrated below. Also explore our WinForms ContextMenuStrip Example that shows you how to render and configure the WinForms ContextMenuStrip.
using Syncfusion.Windows.Forms.Tools;
public partial class Form1 : Form
{
private Syncfusion.Windows.Forms.Tools.ContextMenuStripEx contextMenuStripEx;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.RichTextBox richTextBox1;
public Form1()
{
InitializeComponent();
//Initializing
this.contextMenuStripEx = new Syncfusion.Windows.Forms.Tools.ContextMenuStripEx();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
//Associate the context menu
this.toolStripMenuItem1.Text = "New";
this.toolStripMenuItem2.Text = "Copy";
this.toolStripMenuItem3.Text = "Cut";
this.contextMenuStripEx.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItem1, this.toolStripMenuItem2, this.toolStripMenuItem3, });
this.contextMenuStripEx.ResumeLayout(false);
this.richTextBox1.ContextMenuStrip = this.contextMenuStripEx;
this.Controls.Add(this.richTextBox1);
}
}Not sure how to create your first WinForms ContextMenuStrip? Our documentation can help.
I’d love to read it now125+ WINDOWS FORMS CONTROLS
Frequently Asked Questions
Why should you choose Syncfusion WinForms ContextMenuStrip?
- Seamless navigation through menus and sub menus.
Images and enhanced options to show checked, unchecked, and disabled states.
A rich UI with built-in themes and appearance customization.
- Simple configuration and API.
- Touch friendly and responsive.
Extensive demos, documentation to learn quickly and get started with WinForms ContextMenuStrip.
Where can I find the Syncfusion WinForms ContextMenuStrip demo?
You can find our WinForms ContextMenuStrip demo on
GitHub location.
Can I download and utilize the Syncfusion WinForms ContextMenuStrip for free?
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
How do I get started with Syncfusion WinForms ContextMenuStrip?
A good place to start would be our comprehensive getting started documentation.
Our Customers Love Us
Here are some of their experiences.
Awards
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.