Name
MainMenu
Synopsis
A MainMenu
is the Menu
strip
across the top of a Form
. You can bind it to a
particular form by using the Form.Menu
property.
There is an additional typed CloneMenu()
method,
which allows you to copy the menu structure for reuse elsewhere.
See Menu
for more information on menu
functionality.
public class MainMenu : Menu { // Public Constructors public MainMenu(); public MainMenu(MenuItem[ ] items); // Public Instance Properties public virtual RightToLeft RightToLeft{set; get; } // Public Instance Methods public virtual MainMenu CloneMenu(); public Form GetForm(); public override string ToString(); // overrides Menu // Protected Instance Methods protected override IntPtr CreateMenuHandle(); // overrides Menu protected override void Dispose(bool disposing); // overrides Menu }
Hierarchy
System.Object
→ System.MarshalByRefObject → System.ComponentModel.Component(System.ComponentModel.IComponen,
System.IDisposable)
→ Menu → MainMenu
Returned By
Form.{Menu
, MergedMenu}
,
Menu.GetMainMenu()
,
PrintPreviewDialog.Menu
Passed To
Form.Menu
,
PrintPreviewDialog.Menu
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.