Back to Devexpress

RibbonColorPaletteClickEventArgs Class

blazor-devexpress-dot-blazor-bf6e189f.md

latest1.9 KB
Original Source

RibbonColorPaletteClickEventArgs Class

Contains data for the color palette item’s Click event.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public class RibbonColorPaletteClickEventArgs :
    RibbonItemClickEventArgs

Remarks

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

razor
<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";
    }
}

Inheritance

Object EventArgs DevExpress.Blazor.Ribbon.Internal.RibbonEventArgs DevExpress.Blazor.Ribbon.Internal.RibbonNodeEventArgs RibbonElementClickEventArgs RibbonItemClickEventArgs RibbonColorPaletteClickEventArgs

See Also

RibbonColorPaletteClickEventArgs Members

DevExpress.Blazor Namespace