Skip to main content
All docs
V24.2

TabCloseEventArgs.TabInfo Property

Returns information about the tab related to the event.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public ITabInfo TabInfo { get; }

Property Value

Type Description
ITabInfo

An object that stores information about the tab related to the event.

Remarks

Use the TabInfo event argument to obtain information about the processed tab.

<DxTabs TabClosing="TabClosing">
    @foreach (var employee in Employees) {
        <DxTabPage Text="@(employee.FirstName + ' ' + employee.LastName)" AllowClose="true" >
            ...
        </DxTabPage>
    }
</DxTabs>

@code {
    void TabClosing(TabCloseEventArgs args) {
        // Prevent disabled tabs from closing 
        // and disable closing tab by pressing the Delete key.
        args.Cancel = !args.TabInfo.Enabled || (args.CloseReason == TabCloseReason.DeletePress);
    }
}
See Also