|
@using Syncfusion.EJ2.Blazor.Navigations
<EjsToolbar Width="400px">
<ToolbarItems>
<ToolbarItem Text="Cut" OnClick="ItemClick"></ToolbarItem>
<ToolbarItem Text="Copy"></ToolbarItem>
<ToolbarItem Text="Paste"></ToolbarItem>
<ToolbarItem></ToolbarItem>
<ToolbarItem Text="Bold"></ToolbarItem>
<ToolbarItem Text="Underline"></ToolbarItem>
</ToolbarItems>
</EjsToolbar>
@code{
public void ItemClick(ClickEventArgs args)
{
// Triggers whenever the toolbar item has been clicked
}
} |
|
Note: We will include the Toolbar sample with click handlers in the documentation site which can be available for our upcoming bi-weekly patch release. |
|
<EjsToolbar Items="Toolbaritems">
<ToolbarEvents Clicked="ItemClick"></ToolbarEvents>
</EjsToolbar>
@code {
public List<ToolbarItem> Toolbaritems = new List<ToolbarItem>()
{
new ToolbarItem() { Text = "Cut" },
new ToolbarItem() { Text = "Copy" },
new ToolbarItem() { Text = "Paste" },
new ToolbarItem() { Type = ItemType.Separator },
new ToolbarItem() { Text = "Undo" },
new ToolbarItem() { Text = "Redo" }
};
public void ItemClick(Syncfusion.EJ2.Blazor.Navigations.ClickEventArgs args)
{
// Here you can customize your code based on the args.Item value
}
} |