Skip to main content
All docs
V25.2
  • DxRibbonTab.Contextual Property

    Specifies if the current tab is contextual.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Property Value

    Type Default Description
    Boolean false

    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.

    <DxRibbon>
        <DxRibbonTab Text="Home">
            <!-- ... -->
        </DxRibbonTab>
        <DxRibbonTab Text="Insert">
            <!-- ... -->
        </DxRibbonTab>
        <DxRibbonTab Text="Draw"
                     Contextual="true"
                     Visible="DrawTabVisible">
            <!-- ... -->
        </DxRibbonTab>
    </DxRibbon>
    
    <img src="images/devexpress.svg"
         tabindex="0"
         @onfocus="OnImageFocus"
         @onblur="OnImageBlur" />
    
    @code {
        bool DrawTabVisible = false;
    
        void OnImageFocus(FocusEventArgs args) {
            DrawTabVisible = true;
        }
    
        void OnImageBlur(FocusEventArgs args) {
            DrawTabVisible = false;
        }
    }
    

    Ribbon Contextual Tab

    Implements

    See Also