Back to Devexpress

ITabInfo Interface

blazor-devexpress-dot-blazor-6ac9abd2.md

latest1.4 KB
Original Source

ITabInfo Interface

Contains information about a tab.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public interface ITabInfo

The following members return ITabInfo objects:

Remarks

Use interface properties to obtain information about the processed tab.

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

ITabInfo Members

DevExpress.Blazor Namespace