Class StandardMenusProvider
Inheritance
System.Object
StandardMenusProvider
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Syncfusion.Shared.Base.dll
public class StandardMenusProvider : IContextMenuProvider
Constructors
Declaration
public StandardMenusProvider()
Fields
Declaration
protected ContextMenu cntxtMenu
Field Value
Type |
System.Windows.Forms.ContextMenu |
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(Menu.MenuItemCollection collection)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Menu.MenuItemCollection |
collection |
|
Declaration
protected MenuItem RecurseGetMenuItem(Menu.MenuItemCollection collection, string itemtext)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Menu.MenuItemCollection |
collection |
|
System.String |
itemtext |
|
Returns
Type |
System.Windows.Forms.MenuItem |
Declaration
protected Menu.MenuItemCollection RecurseGetParentCollection(Menu.MenuItemCollection collection, string itemtext)
Parameters
Type |
Name |
Description |
System.Windows.Forms.Menu.MenuItemCollection |
collection |
|
System.String |
itemtext |
|
Returns
Type |
System.Windows.Forms.Menu.MenuItemCollection |
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 EventHandler Collapse
Event Type
Occurs when menu is popped up.
Declaration
public event EventHandler Popup
Event Type
Implements