Class StandardMenusProvider
Inheritance
System.Object
StandardMenusProvider
Assembly: Syncfusion.Shared.Base.dll
public class StandardMenusProvider : Object, IContextMenuProvider
Constructors
Declaration
public StandardMenusProvider()
Fields
Declaration
protected ContextMenuStrip cntxtMenu
Field Value
| Type |
| System.Windows.Forms.ContextMenuStrip |
Declaration
protected Hashtable handlerMap
Field Value
| Type |
| System.Collections.Hashtable |
Declaration
protected bool m_bNeedAddRemoveButton
Field Value
Methods
AddContextMenuItem(String, EventHandler)
Declaration
public void AddContextMenuItem(string itemtext, EventHandler handler)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
| System.EventHandler |
handler |
|
AddContextMenuItem(String, String, EventHandler)
Declaration
public void AddContextMenuItem(string parentitemtext, string itemtext, EventHandler handler)
Parameters
| Type |
Name |
Description |
| System.String |
parentitemtext |
|
| System.String |
itemtext |
|
| System.EventHandler |
handler |
|
Declaration
ContextMenuCommandHandler(Object, EventArgs)
Declaration
protected void ContextMenuCommandHandler(object sender, EventArgs args)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
| System.EventArgs |
args |
|
DisposeContextMenu()
Declaration
public void DisposeContextMenu()
GetContextMenuItemChecked(String)
Declaration
public bool GetContextMenuItemChecked(string itemtext)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
Returns
GetContextMenuItemEnabled(String)
Declaration
public bool GetContextMenuItemEnabled(string itemtext)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
Returns
GetContextMenuItemShortcut(String)
Declaration
public Shortcut GetContextMenuItemShortcut(string itemtext)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
Returns
| Type |
| System.Windows.Forms.Shortcut |
Gets the ContextMenu items Count.
Declaration
public int GetItemsCount()
Returns
InitializeContextMenu()
Declaration
public void InitializeContextMenu()
Indicates whether "Add or Remove buttons" is needed.
Declaration
public bool NeedAddRemoveButtons()
Returns
Declaration
protected void RecurseDisposeMenuItems(ToolStripItemCollection collection)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripItemCollection |
collection |
|
Declaration
protected ToolStripMenuItem RecurseGetMenuItem(ToolStripItemCollection collection, string itemtext)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripItemCollection |
collection |
|
| System.String |
itemtext |
|
Returns
| Type |
| System.Windows.Forms.ToolStripMenuItem |
Declaration
protected ToolStripItemCollection RecurseGetParentCollection(ToolStripItemCollection collection, string itemtext)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.ToolStripItemCollection |
collection |
|
| System.String |
itemtext |
|
Returns
| Type |
| System.Windows.Forms.ToolStripItemCollection |
RemoveContextMenuItem(String)
Declaration
public void RemoveContextMenuItem(string itemtext)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
SetContextMenuItemChecked(String, Boolean)
Declaration
public void SetContextMenuItemChecked(string itemtext, bool bchecked)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
| System.Boolean |
bchecked |
|
SetContextMenuItemEnabled(String, Boolean)
Declaration
public void SetContextMenuItemEnabled(string itemtext, bool benabled)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
| System.Boolean |
benabled |
|
SetContextMenuItemImage(String, ImageList, Int32)
Declaration
public void SetContextMenuItemImage(string itemtext, ImageList list, int index)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
| System.Windows.Forms.ImageList |
list |
|
| System.Int32 |
index |
|
SetContextMenuItemSeparator(String, Boolean)
Declaration
public void SetContextMenuItemSeparator(string itemtext, bool binsertseparator)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
| System.Boolean |
binsertseparator |
|
SetContextMenuItemShortcut(String, Shortcut)
Declaration
public void SetContextMenuItemShortcut(string itemtext, Shortcut key)
Parameters
| Type |
Name |
Description |
| System.String |
itemtext |
|
| System.Windows.Forms.Shortcut |
key |
|
Declaration
public void SetVisualStyle(VisualStyle style)
Parameters
ShowContextMenu(Control, Point)
Declaration
public void ShowContextMenu(Control owner, Point pt)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.Control |
owner |
|
| System.Drawing.Point |
pt |
|
Events
Occurs when menu is collapsed.
Declaration
public event ToolStripDropDownClosingEventHandler Closing
Event Type
| Type |
| System.Windows.Forms.ToolStripDropDownClosingEventHandler |
Occurs when menu is popped up.
Declaration
public event CancelEventHandler Opening
Event Type
| Type |
| System.ComponentModel.CancelEventHandler |
Implements