Skip to main content

DxTabs.ActiveTabIndex Property

Specifies the active tab’s zero-based index.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor


public int ActiveTabIndex { get; set; }

Property Value

Type Default Description
Int32 0

An integer value that specifies a zero-based index.


The ActiveTabIndex property value should be between zero and the number of tabs minus one.

To handle changes to the active tab, use the ActiveTabIndexChanged event.

The following example demonstrates how to update the content area when a user selects a tab.

<DxTabs @bind-ActiveTabIndex="@ActiveTabIndex" SizeMode="Params.SizeMode">
    <DxTab Text="About Us"></DxTab>
    <DxTab Text="Web Controls"></DxTab>
    <DxTab Text="Support"></DxTab>
<div class="card tabs-border-top-0 tabs-border-radius-top-0" style="min-height: 190px">
    <div class="card-body">
        @switch(ActiveTabIndex) {
            case 0:
                <h4>From 1998 to the Present</h4>
                <p>We look forward to working with you and will do everything we can to make your experience with us a profitable one.</p>
            case 1:
                    <li><a href="">ASP.NET Web Forms </a></li>
                    <li><a href="">ASP.NET MVC</a></li>
                    <li><a href="">ASP.NET Core</a></li>
                    <li><a href="">Bootstrap Web Forms</a></li>
                    <li><a href="">JavaScript - jQuery, Angular, React, Vue</a></li>
                    <li><a href="">Blazor</a></li>
                    <li><a href="">Web Reporting</a></li>
            case 2:
                <p>Submit your support inquiries via the <a href="">DevExpress Support Center</a> for assistance.</p>


@code {
    int ActiveTabIndex { get; set; } = 1;

Tabs ActiveIndex

Run Demo: Tabs - Active Tab

See Also