WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class StandardMenusProvider

    Show / Hide Table of Contents

    Class StandardMenusProvider

    The StandardMenusProvider class implements the IContextMenuProvider interface and serves as the menu provider for the standard .NET context menus. Controls that have a StandardMenusProvider object set as their menu provider will display a System.Windows.Forms.ContextMenu instance. IContextMenuProvider

    Inheritance
    System.Object
    StandardMenusProvider
    Implements
    IContextMenuProvider
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class StandardMenusProvider : IContextMenuProvider

    Constructors

    StandardMenusProvider()

    Creates an instance of the StandardMenusProvider class.

    Declaration
    public StandardMenusProvider()

    Fields

    cntxtMenu

    Declaration
    protected ContextMenu cntxtMenu
    Field Value
    Type Description
    System.Windows.Forms.ContextMenu

    handlerMap

    Declaration
    protected Hashtable handlerMap
    Field Value
    Type Description
    System.Collections.Hashtable

    m_bNeedAddRemoveButton

    Declaration
    protected bool m_bNeedAddRemoveButton
    Field Value
    Type Description
    System.Boolean

    Methods

    AddContextMenuItem(String, EventHandler)

    Overridden. See 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)

    Overridden. See 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

    Clear()

    Clears all menu items.

    Declaration
    public void Clear()

    ContextMenuCommandHandler(Object, EventArgs)

    Declaration
    protected void ContextMenuCommandHandler(object sender, EventArgs args)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs args

    DisposeContextMenu()

    Overridden. See DisposeContextMenu().

    Declaration
    public void DisposeContextMenu()

    GetContextMenuItemChecked(String)

    Overridden. See GetContextMenuItemChecked(String).

    Declaration
    public bool GetContextMenuItemChecked(string itemtext)
    Parameters
    Type Name Description
    System.String itemtext
    Returns
    Type Description
    System.Boolean

    GetContextMenuItemEnabled(String)

    Overridden. See GetContextMenuItemEnabled(String).

    Declaration
    public bool GetContextMenuItemEnabled(string itemtext)
    Parameters
    Type Name Description
    System.String itemtext
    Returns
    Type Description
    System.Boolean

    GetContextMenuItemShortcut(String)

    Overridden. See GetContextMenuItemShortcut(String).

    Declaration
    public Shortcut GetContextMenuItemShortcut(string itemtext)
    Parameters
    Type Name Description
    System.String itemtext
    Returns
    Type Description
    System.Windows.Forms.Shortcut

    GetItemsCount()

    Gets the ContextMenu items Count.

    Declaration
    public int GetItemsCount()
    Returns
    Type Description
    System.Int32

    InitializeContextMenu()

    Overridden. See InitializeContextMenu().

    Declaration
    public void InitializeContextMenu()

    NeedAddRemoveButtons()

    Indicates whether "Add or Remove buttons" is needed.

    Declaration
    public bool NeedAddRemoveButtons()
    Returns
    Type Description
    System.Boolean

    RecurseDisposeMenuItems(Menu.MenuItemCollection)

    Declaration
    protected void RecurseDisposeMenuItems(Menu.MenuItemCollection collection)
    Parameters
    Type Name Description
    System.Windows.Forms.Menu.MenuItemCollection collection

    RecurseGetMenuItem(Menu.MenuItemCollection, String)

    Declaration
    protected MenuItem RecurseGetMenuItem(Menu.MenuItemCollection collection, string itemtext)
    Parameters
    Type Name Description
    System.Windows.Forms.Menu.MenuItemCollection collection
    System.String itemtext
    Returns
    Type Description
    System.Windows.Forms.MenuItem

    RecurseGetParentCollection(Menu.MenuItemCollection, String)

    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 Description
    System.Windows.Forms.Menu.MenuItemCollection

    RemoveContextMenuItem(String)

    Overridden. See RemoveContextMenuItem(String).

    Declaration
    public void RemoveContextMenuItem(string itemtext)
    Parameters
    Type Name Description
    System.String itemtext

    SetContextMenuItemChecked(String, Boolean)

    Overridden. See SetContextMenuItemChecked(String, Boolean).

    Declaration
    public void SetContextMenuItemChecked(string itemtext, bool bchecked)
    Parameters
    Type Name Description
    System.String itemtext
    System.Boolean bchecked

    SetContextMenuItemEnabled(String, Boolean)

    Overridden. See 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)

    Overridden. See 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)

    Overridden. See SetContextMenuItemSeparator(String, Boolean).

    Declaration
    public void SetContextMenuItemSeparator(string itemtext, bool binsertseparator)
    Parameters
    Type Name Description
    System.String itemtext
    System.Boolean binsertseparator

    SetContextMenuItemShortcut(String, Shortcut)

    Overridden. See SetContextMenuItemShortcut(String, Shortcut).

    Declaration
    public void SetContextMenuItemShortcut(string itemtext, Shortcut key)
    Parameters
    Type Name Description
    System.String itemtext
    System.Windows.Forms.Shortcut key

    SetVisualStyle(VisualStyle)

    Overridden. See SetVisualStyle(VisualStyle).

    Declaration
    public void SetVisualStyle(VisualStyle style)
    Parameters
    Type Name Description
    VisualStyle style

    ShowContextMenu(Control, Point)

    Overridden. See 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

    Collapse

    Occurs when menu is collapsed.

    Declaration
    public event EventHandler Collapse
    Event Type
    Type Description
    System.EventHandler

    Popup

    Occurs when menu is popped up.

    Declaration
    public event EventHandler Popup
    Event Type
    Type Description
    System.EventHandler

    Implements

    IContextMenuProvider
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved