Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
[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.

razor
<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