Visual Basic (Declaration) | |
---|---|
Public Overrides Property ContextMenu As ContextMenu |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As EditBase Dim value As ContextMenu instance.ContextMenu = value value = instance.ContextMenu |
C# | |
---|---|
public override ContextMenu ContextMenu {get; set;} |
Property Value
A System.Windows.Forms.ContextMenu that represents the shortcut menu associated with the control.The default is a null reference (Nothing in Visual Basic).
Use shortcut menus to give context-specific menu options to users when they right-click on the control.
Notes to Inheritors:
When overriding the ContextMenu property in a derived class, use the base class's ContextMenu property to extend the base implementation; otherwise, you must provide the implementation. You are not required to override both the get and set accessors of the ContextMenu property; you can override only one if needed.
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8