Skip to main content
All docs
V25.2
  • RibbonColorPaletteClickEventArgs.Item Property

    Returns information about the clicked color palette item.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public IRibbonColorPalette Item { get; }

    Property Value

    Type Description
    IRibbonColorPalette

    An object that contains information about the clicked color palette item.

    Remarks

    The following code snippet adds an automatic color swatch to the clicked color palette item:

    <DxRibbon>
        <DxRibbonTab Text="Home">
            <DxRibbonGroup>
                <DxRibbonColorPaletteItem @bind-Value="CurrentColor"
                                          Colors="@DxColorPalettePresets.GetPalette(ColorPalettePresetType.FluentThemeGradient)"
                                          Click="OnClick"/>
            </DxRibbonGroup>
        </DxRibbonTab>
    </DxRibbon>
    
    @code {
        string CurrentColor = "";
    
        private void OnClick(RibbonColorPaletteClickEventArgs args) {
            args.Item.AutomaticColor = "black";
            args.Item.AutomaticColorCaption = "Black";
        }
    }
    
    See Also