Provides internal helper methods for managing context menu items across different framework targets.
Inheritance
System.Object
ContextMenuHelper
Assembly: Syncfusion.Chart.Windows.dll
public static class ContextMenuHelper : Object
Methods
AddItem(ToolStripItemCollection, String, EventHandler)
Adds a new item to the specified menu item collection with the given text and event handler.
Declaration
public static void AddItem(ToolStripItemCollection menuItemCollection, string text, EventHandler eventHandler)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripItemCollection |
menuItemCollection |
|
| System.String |
text |
|
| System.EventHandler |
eventHandler |
|
AddMenuItem(ToolStripItemCollection, String, EventHandler)
Adds a new menu item to the specified collection with a text and event handler.
Declaration
public static void AddMenuItem(ToolStripItemCollection menuItemCollection, string text, EventHandler eventHandler)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripItemCollection |
menuItemCollection |
|
| System.String |
text |
|
| System.EventHandler |
eventHandler |
|
Retrieves the collection of menu items from a context menu.
Declaration
public static ToolStripItemCollection GetContextMenuItems(ContextMenuStrip contextMenu)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ContextMenuStrip |
contextMenu |
|
Returns
| Type |
| System.Windows.Forms.ToolStripItemCollection |
Retrieves the index of a menu item within its parent collection.
Declaration
public static int GetIndex(ToolStripMenuItem menuItem)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripMenuItem |
menuItem |
|
Returns
Retrieves the collection of child menu items for a given menu item.
Declaration
public static ToolStripItemCollection GetMenuItems(ToolStripMenuItem menuItem)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripMenuItem |
menuItem |
|
Returns
| Type |
| System.Windows.Forms.ToolStripItemCollection |
Retrieves the parent menu of a given menu item.
Declaration
public static ToolStripItem GetParent(ToolStripMenuItem menuItem)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripMenuItem |
menuItem |
|
Returns
| Type |
| System.Windows.Forms.ToolStripItem |