Skip to main content

dxMenu

Namespace: Wisej.Web.Ext.DevExtreme

Assembly: Wisej.Web.Ext.DevExtreme (4.1.0.0)

The Menu widget is a panel with clickable items.

public class dxMenu : dxBase

Constructors​

Instance member dxMenu()​

Constructs a new instance of the dxMenu class.

Example:

The following example creates a menu with a submenu and shows the text of the item clicked by the user.

var menu = new dxMenu();
menu.Options.items = new object[]
{
new { text = "File", items = new[] { new { text = "New" }, new { text = "Open" } } },
new { text = "Help" }
};
menu.Instance.onItemClick += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Clicked: {e.Data.itemData.text}");
});
menu.Dock = DockStyle.Top;
this.Controls.Add(menu);

Instance member dxMenu(options)​

Constructs a new instance of the dxMenu class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a vertical menu that opens its submenus when the user clicks an item.

var menu = new dxMenu(new
{
items = new object[]
{
new { text = "Products", icon = "product", items = new[] { new { text = "Laptops" }, new { text = "Monitors" } } },
new { text = "Orders", icon = "cart" }
},
orientation = "vertical",
showFirstSubmenuMode = "onClick"
});
menu.Dock = DockStyle.Left;
this.Controls.Add(menu);

Implements​