Skip to main content

DxTabs.ActiveTabIndexChanged Event

Fires when the active tab is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[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 example below shows how to handle the ActiveTabIndexChanged event:

<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;
    }
}

Active tab changed

Run Demo: Tabs - Active Tab

See Also