DxToolbarItem.Template Property
Specifies the template to display an item’s content.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v21.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public RenderFragment<IToolbarItemInfo> Template { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<IToolbarItemInfo> | The template content for an object of the IToolbarItemInfo type that stores information about an item (the text, state, icon, etc.) |
Remarks
Use the Template property to completely override an individual item’s content, including text, icon, child item, etc.
The example below demonstrates how to add the Search text box to the Toolbar component.
<div class="card-header p-2 bg-transparent">
<DxToolbar ItemRenderStyleMode="ToolbarRenderStyleMode.Plain">
<Items>
<DxToolbarItem>
<Template>
<div class="dxbs-textbox">
<input type="text" class="form-control" placeholder="Search...">
<span class="dxbs-feedback">
<span class="d-flex pl-2 pr-2" role="button" style="color:gray">
<span class="oi oi-magnifying-glass"></span>
</span>
</span>
</div>
</Template>
</DxToolbarItem>
<DxToolbarItem IconCssClass="oi oi-cog" Tooltip="Settings" />
</Items>
</DxToolbar>
</div>
See Also