Menu
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
The menu component is a graphical user interface that serves as navigation header for your application or site.
- C#
- VB.NET
public class Menu : ej2Base
Public Class Menu
Inherits ej2Base
Constructors
Menu()
Constructs a new instance of the Menu class.
Example:
The following example creates a menu and defines its items through the Options object.
var menu = new Menu();
menu.Options.items = new[]
{
new { text = "File", items = new[] { new { text = "Open" }, new { text = "Save" } } },
new { text = "Edit", items = new[] { new { text = "Cut" }, new { text = "Copy" } } }
};
menu.Dock = DockStyle.Top;
this.Controls.Add(menu);
Menu(options)
Constructs a new instance of the Menu class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a vertical menu that opens the sub menus when the user clicks the parent item.
var menu = new Menu(new
{
orientation = "Vertical",
showItemOnClick = true,
items = new object[]
{
new { text = "Orders", items = new[] { new { text = "New Order" }, new { text = "Order History" } } },
new { text = "Customers" },
new { text = "Help" }
}
});
this.Controls.Add(menu);