Skip to main content
All docs
V25.2
  • DxRibbon.TabClick Event

    Fires when a user clicks a Ribbon tab caption.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    Declaration

    [DefaultValue(null)]
    [Parameter]
    public EventCallback<RibbonTabClickEventArgs> TabClick { get; set; }

    Event Data

    The TabClick event's data class is RibbonTabClickEventArgs. The following properties provide information specific to this event:

    Property Description
    Element Returns information about a clicked Ribbon element. Inherited from RibbonElementClickEventArgs.
    MouseEventArgs The Blazor’s built-in MouseEventArgs event arguments. Inherited from RibbonElementClickEventArgs.
    Tab Returns information about a clicked Ribbon tab.

    Remarks

    Handle the TabClick event to perform custom actions when a user clicks a caption of any Ribbon tab, except for the application tab. To handle application tab clicks, use the ApplicationTabClick event.

    <DxRibbon TabClick="OnTabClick">
        <DxRibbonTab Text="Home"></DxRibbonTab>
        <DxRibbonTab Text="Insert"></DxRibbonTab>
        <DxRibbonTab Text="Review"></DxRibbonTab>
    </DxRibbon>
    
    <p>@Notification</p>
    
    @code {
        string Notification = "Click any tab";
    
        void OnTabClick(RibbonTabClickEventArgs args)
        {
            Notification = $@"You selected ""{args.Tab.Text}"" tab";
        }
    }
    

    If you prefer to attach a listener directly to each tab, use the Click event.

    Implements

    See Also