Class ToolBarItemModel
Represents the class for a Toolbar item model.
Inheritance
Namespace: Syncfusion.Blazor.FileManager
Assembly: Syncfusion.Blazor.dll
Syntax
public class ToolBarItemModel : Object
Constructors
ToolBarItemModel()
Declaration
public ToolBarItemModel()
Properties
Align
Gets or sets the location for aligning Toolbar items on the Toolbar. Each command will be aligned according to the align
property.
Declaration
public ItemAlign Align { get; set; }
Property Value
Type |
---|
ItemAlign |
Remarks
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.
Click
Gets or sets an event callback that is raised when a toolbar item is clicked.
Declaration
public EventCallback<ClickEventArgs> Click { get; set; }
Property Value
Type |
---|
Microsoft.AspNetCore.Components.EventCallback<ClickEventArgs> |
CssClass
Gets or sets single/multiple classes (separated by space) to be used for customization of commands.
Declaration
public string CssClass { get; set; }
Property Value
Type |
---|
System.String |
Disabled
Gets or sets a value that denotes whether an item should be disabled or not.
Declaration
public bool Disabled { get; set; }
Property Value
Type |
---|
System.Boolean |
HtmlAttributes
Gets or sets the 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 |
---|
System.Collections.Generic.Dictionary<System.String, System.Object> |
Id
Gets or sets the unique ID to be used with button or input element of Toolbar items.
Declaration
public string Id { get; set; }
Property Value
Type |
---|
System.String |
Name
Gets or sets the custom tool name.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | Accepts a string value. The default value is |
Remarks
To map the Template, use the same 'Name' property in the tags and items list.
Overflow
Gets or sets the Toolbar command display area when an element's content is too large to fit available space.
Declaration
public OverflowOption Overflow { get; set; }
Property Value
Type |
---|
OverflowOption |
Remarks
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.
PrefixIcon
Gets or sets 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 |
---|
System.String |
ShowAlwaysInPopup
Gets or sets 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 |
---|
System.Boolean |
ShowTextOn
Gets or sets where the button text will be displayed on popup mode of the Toolbar.
Declaration
public DisplayMode ShowTextOn { get; set; }
Property Value
Type |
---|
DisplayMode |
Remarks
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.
SuffixIcon
Gets or sets 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 |
---|
System.String |
Template
Gets or sets 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 |
---|
Microsoft.AspNetCore.Components.RenderFragment |
Text
Gets or sets the text to be displayed on the Toolbar button.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
TooltipText
Gets or sets the text to be displayed on hovering the Toolbar button.
Declaration
public string TooltipText { get; set; }
Property Value
Type |
---|
System.String |
Type
Gets or sets the types of command to be rendered in the Toolbar.
Declaration
public ItemType Type { get; set; }
Property Value
Type |
---|
ItemType |
Remarks
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 components like DropDownList, AutoComplete, etc.
Visible
Gets or sets a value that denotes whether an item should be hidden or not.
Declaration
public bool Visible { get; set; }
Property Value
Type |
---|
System.Boolean |
Width
Gets or sets the width of the Toolbar button commands.
Declaration
public string Width { get; set; }
Property Value
Type |
---|
System.String |