Back to Devexpress

DxTabBase.TextTemplate Property

blazor-devexpress-dot-blazor-dot-base-dot-dxtabbase-d922e39c.md

latest1.9 KB
Original Source

DxTabBase.TextTemplate Property

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

Namespace : DevExpress.Blazor.Base

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

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

See Also

DxTabBase Class

DxTabBase Members

DevExpress.Blazor.Base Namespace