Class ToolbarItem
An item object that is used to configure Toolbar commands.
Inheritance
System.Object
Syncfusion.Blazor.SfBaseComponent
ToolbarItem
Assembly: Syncfusion.Blazor.dll
public class ToolbarItem : SfBaseComponent
Constructors
Declaration
Properties
Specifies the location for aligning Toolbar items on the Toolbar. Each command will be aligned according to the Align
property.
Possible values are:
- Left: To align commands to the left side of the Toolbar.
- Center: To align commands at the center of the Toolbar.
- Right: To align commands to the right side of the Toolbar.
Declaration
public ItemAlign Align { get; set; }
Property Value
ChildContent
Child Content for Toolbar item
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.RenderFragment |
|
Defines single/multiple classes (separated by space) to be used for customization of commands.
Declaration
public string CssClass { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies whether an item should be disabled or not.
Declaration
public bool Disabled { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Defines htmlAttributes used to add custom attributes to Toolbar command.
Supports HTML attributes such as style, class, etc.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
|
Specifies the unique ID to be used with button or input element of Toolbar items.
Declaration
public string Id { get; set; }
Property Value
Type |
Description |
System.String |
|
Event triggers when click the toolbar item.
Declaration
public EventCallback<ClickEventArgs> OnClick { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.EventCallback<ClickEventArgs> |
|
Specifies the Toolbar command display area when an element's content is too large to fit available space.
This is applicable only to Popup
mode. Possible values are:
- Show: Always shows the item as the primary priority on the Toolbar.
- Hide: Always shows the item as the secondary priority on the popup.
- None: No priority for display, and as per normal order moves to popup when content exceeds.
Declaration
public OverflowOption Overflow { get; set; }
Property Value
Defines single/multiple classes separated by space used to specify an icon for the button.
The icon will be positioned before the text content if text is available, otherwise the icon alone will be rendered.
Declaration
public string PrefixIcon { get; set; }
Property Value
Type |
Description |
System.String |
|
Defines the priority of items to display it in popup always.
It allows to maintain toolbar item on popup always but it does not work for toolbar priority items.
Declaration
public bool ShowAlwaysInPopup { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ShowTextOn
Specifies where the button text will be displayed on popup mode of the Toolbar.
Possible values are:
- Toolbar: Text will be displayed on Toolbar only.
- Overflow: Text will be displayed only when content overflows to popup.
- Both: Text will be displayed on popup and Toolbar.
Declaration
public DisplayMode ShowTextOn { get; set; }
Property Value
Defines single/multiple classes separated by space used to specify an icon for the button.
The icon will be positioned after the text content if text is available.
Declaration
public string SuffixIcon { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies the HTML element/element ID as a string that can be added as a Toolbar command.
Declaration
public RenderFragment Template { get; set; }
Property Value
Type |
Description |
Microsoft.AspNetCore.Components.RenderFragment |
|
Text
Specifies the text to be displayed on the Toolbar button.
Declaration
public string Text { get; set; }
Property Value
Type |
Description |
System.String |
|
TooltipText
Specifies the text to be displayed on hovering the Toolbar button.
Declaration
public string TooltipText { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies the types of command to be rendered in the Toolbar.
Supported types are:
- Button: Creates the Button control with its given properties like text, prefixIcon, etc.
- Separator: Adds a horizontal line that separates the Toolbar commands.
- Input: Creates an input element that is applicable to template rendering with Syncfusion controls like DropDownList,
AutoComplete, etc.
Declaration
public ItemType Type { get; set; }
Property Value
Specifies whether an item should be hidden or not.
Declaration
public bool Visible { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specifies the width of the Toolbar button commands.
Declaration
public string Width { get; set; }
Property Value
Type |
Description |
System.String |
|
Methods
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
Type |
Name |
Description |
Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder |
__builder |
|
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Syncfusion.Blazor.SfBaseComponent.OnInitializedAsync()
Declaration
protected override Task OnParametersSetAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|