Sidebar
Namespace: Wisej.Web.Ext.Webix
Assembly: Wisej.Web.Ext.Webix (4.1.0.0)
Webix Sidebar is a Tree-based component which is used for creating menus with hierarchical structure.
- C#
- VB.NET
public class Sidebar : wxBase
Public Class Sidebar
Inherits wxBase
Constructors
Sidebar()
Constructs a new instance of the Sidebar class.
Example:
The following example creates a sidebar with three menu items.
var sidebar = new Sidebar();
sidebar.Options.data = new[]
{
new { id = "customers", icon = "wxi-user", value = "Customers" },
new { id = "orders", icon = "wxi-folder", value = "Orders" },
new { id = "calendar", icon = "wxi-calendar", value = "Calendar" }
};
sidebar.Dock = DockStyle.Left;
sidebar.Width = 220;
this.Controls.Add(sidebar);
Sidebar(options)
Constructs a new instance of the Sidebar class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a sidebar with a hierarchical menu; the nested data collection defines the sub items.
var sidebar = new Sidebar(new
{
data = new object[]
{
new { id = "dashboard", icon = "wxi-columns", value = "Dashboard" },
new
{
id = "reports",
icon = "wxi-folder",
value = "Reports",
data = new[]
{
new { id = "sales", value = "Sales" },
new { id = "costs", value = "Costs" }
}
}
}
});
sidebar.Dock = DockStyle.Left;
sidebar.Width = 220;
this.Controls.Add(sidebar);