Skip to main content

DxTabBase.TextTemplate Property

Specifies the template used to display the tab’s text.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public RenderFragment TextTemplate { get; set; }

Property Value

Type Description
RenderFragment

The template content.

Remarks

Use the TextTemplate property to apply a template for the tab’s text.

<DxTabs>
    @foreach (var employee in Employees) {
        <DxTabPage>
            <TextTemplate>
                <div>
                    <img src="@(StaticAssetUtils.GetImagePath(employee.ImageFileName))" height="100" 
                         alt="@(employee.FullName + " photo")" />
                    <p>@employee.FullName</p>
                </div>
            </TextTemplate>
            <ChildContent>
                <div class="d-flex demo-employee-card">
                    <div class="flex-grow-1 ps-3">
                        <h5>@employee.Title @employee.FirstName @employee.LastName</h5>
                        <p>
                            <b>Birthday:</b> @employee.BirthDate?.ToShortDateString()
                        </p>
                        <p>@employee.Notes</p>
                    </div>
                </div>
            </ChildContent>
        </DxTabPage>
    }
</DxTabs>

Tabs - TextTemplate

See Also