March 2003
Intermediate to advanced
896 pages
32h 35m
English
ContextMenu
Derived from Menu, this represents a pop-up menu.
Extending the base functionality, you can Show()
the menu at a particular System.Drawing.Point, and
you can set the owner Control, which you can
retrieve through the SourceControl property.
public class ContextMenu : Menu { // Public Constructors public ContextMenu(); public ContextMenu(MenuItem[ ] menuItems); // Public Instance Properties public virtual RightToLeft RightToLeft{set; get; } public Control SourceControl{get; } // Public Instance Methods public void Show(Control control, System.Drawing.Point pos); // Protected Instance Methods protected internal virtual void OnPopup(EventArgs e); // Events public event EventHandler Popup; }
System.Object
→ System.MarshalByRefObject → System.ComponentModel.Component(System.ComponentModel.IComponen,
System.IDisposable)
→ Menu → ContextMenu
Control.ContextMenu, Menu.GetContextMenu(), NotifyIcon.ContextMenu
Control.ContextMenu,
NotifyIcon.ContextMenu
Read now
Unlock full access