Skip to main content

Toolbar

Namespace: Wisej.Web.Ext.Syncfusion2

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

Displays a group of command buttons arranged horizontally.

public class Toolbar : ej2Base

Constructors​

Instance member Toolbar()​

Constructs a new instance of the Toolbar class.

Example:

The following example creates a toolbar and defines its buttons through the Options object.

var toolbar = new Toolbar();
toolbar.Options.items = new object[]
{
new { text = "New" },
new { text = "Open" },
new { type = "Separator" },
new { text = "Print" }
};
toolbar.Dock = DockStyle.Top;
this.Controls.Add(toolbar);

Instance member Toolbar(options)​

Constructs a new instance of the Toolbar class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a toolbar that moves the buttons that do not fit in a popup, and handles the click on the buttons on the server.

var toolbar = new Toolbar(new
{
overflowMode = "Popup",
items = new object[]
{
new { id = "cut", text = "Cut", tooltipText = "Cut" },
new { id = "copy", text = "Copy", tooltipText = "Copy" },
new { id = "paste", text = "Paste", tooltipText = "Paste" }
}
});
toolbar.Instance.onClicked += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Clicked {e.Data.item.id}");
});
toolbar.Dock = DockStyle.Top;
this.Controls.Add(toolbar);

Implements​