Skip to main content
All docs
V25.2
  • DxRibbonButtonBase<TClickEventArgs>.Click Event

    Fires when a user clicks a button or a drop-down button in the Ribbon.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Parameters

    Type Description
    TClickEventArgs

    An object that contains event data.

    Remarks

    Handle the Click event to perform custom actions when a user clicks a Ribbon button or drop-down button.

    Note

    This event only applies to Ribbon items added with the DxRibbonItem component.

    <DxRibbon>
        <DxRibbonTab Text="Home">
            <DxRibbonGroup Text="Style">
                <DxRibbonItem Text="Bold"
                              IconCssClass="dx-icon-bold"
                              Click="MakeBold" />
            </DxRibbonGroup>
        </DxRibbonTab>
    </DxRibbon>
    
    <p style="@(isBold ? "font-weight: bold;" : "")">
        Click the ribbon button to make this text bold.
    </p>
    
    @code {
        public bool isBold = false;
    
        private void MakeBold(RibbonItemClickEventArgs args)
        {
            isBold = true;
        }
    }
    

    If you prefer to handle all clicks on ribbon items in one place, use the ItemClick event.

    Other Ribbon components, such as application tab items, color pickers or combo boxes fire different events, which cannot be handled by the Click event:

    See Also