Back to Devexpress

DxRibbonTab.Contextual Property

blazor-devexpress-dot-blazor-dot-dxribbontab-acfc19c8.md

latest2.0 KB
Original Source

DxRibbonTab.Contextual Property

Specifies if the current tab is contextual.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(false)]
[Parameter]
public bool Contextual { get; set; }

Property Value

TypeDefaultDescription
Booleanfalse

true if the tab is contextual; false if the tab is not contextual.

|

Remarks

Set the Contextual property to true to mark that the tab is contextual. The DxRibbon component highlights contextual tabs and displays them after standard tabs.

Contextual tabs appear under certain conditions, such as when a user selects an image or a table. Use the Visible property to manage tab visibility.

razor
<DxRibbon>
    <DxRibbonTab Text="Home">
        <!-- ... -->
    </DxRibbonTab>
    <DxRibbonTab Text="Insert">
        <!-- ... -->
    </DxRibbonTab>
    <DxRibbonTab Text="Draw"
                 Contextual="true"
                 Visible="DrawTabVisible">
        <!-- ... -->
    </DxRibbonTab>
</DxRibbon>



@code {
    bool DrawTabVisible = false;

    void OnImageFocus(FocusEventArgs args) {
        DrawTabVisible = true;
    }

    void OnImageBlur(FocusEventArgs args) {
        DrawTabVisible = false;
    }
}

Implements

Contextual

See Also

DxRibbonTab Class

DxRibbonTab Members

DevExpress.Blazor Namespace