Toolbar
Namespace: Wisej.Web.Ext.Syncfusion2
Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)
Displays a group of command buttons arranged horizontally.
- C#
- VB.NET
public class Toolbar : ej2Base
Public Class Toolbar
Inherits ej2Base
Constructors
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);
Toolbar(options)
Constructs a new instance of the Toolbar class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial 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);