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

DxTabs.ActiveTabIndexChanged Event

Fires when the active tab is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<int> ActiveTabIndexChanged { get; set; }

#Parameters

Type Description
Int32

An integer value that specifies the new active tab’s zero-based index.

#Remarks

The ActiveTabIndexChanged event allows you to handle the active tab change.

The following code snippet handles the ActiveTabIndexChanged event:

Razor
<DxTabs ActiveTabIndex="@ActiveTabIndex" ActiveTabIndexChanged=@OnActiveTabIndexChanged>
    <DxTab Text="Home"></DxTab>
    <DxTab Text="Products"></DxTab>
    <DxTab Text="Support"></DxTab>
</DxTabs>

Current active index: @ActiveTabIndex

@code {
    int ActiveTabIndex;
    void OnActiveTabIndexChanged(int index) {
        ActiveTabIndex = index;
    }
}

Run Demo: Tabs - Active Tab

See Also