Skip to main content

DxToolbar.TitleTemplate Property

Specifies the template for the toolbar title.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

Declaration

[Parameter]
public RenderFragment<object> TitleTemplate { get; set; }

Property Value

Type Description
RenderFragment<Object>

The template content.

Remarks

The TitleTemplate property specifies the template for the toolbar title. You can use the template’s context parameter to get the toolbar’s title. The code below uses this parameter to specify the alt attribute for the image.

<div class="card p-2">
    <DxToolbar Title="DevExpress Logo">
        <TitleTemplate>
            <img width="120" src="images/Logo-Monochrome.svg" alt="@context" />
        </TitleTemplate>
        <Items>
            <DxToolbarItem Text="Products" />
            <DxToolbarItem Text="Support" />
            <DxToolbarItem Text="Documentation" />
         </Items>
    </DxToolbar>
</div>

Title Template

Run Demo: Toolbar - Templates

See Also