Skip to main content
All docs
V25.2
  • IRibbonColorPalette.ColorGroups Property

    Returns a collection of color groups in the Ribbon’s color palette.

    Namespace: DevExpress.Blazor.Ribbon

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    IEnumerable<IRibbonColorGroup> ColorGroups { get; }

    Property Value

    Type Description
    IEnumerable<IRibbonColorGroup>

    Color groups.

    Remarks

    Use the ColorGroups property to access color groups under the Ribbon’s color palette. You can obtain an individual color groups by its index.

    <DxRibbon>
        <DxRibbonTab Text="Home">
            <DxRibbonGroup>
                <DxRibbonItem Text="Get Color Group Name"
                              Click="GetColorGroupName" />
            </DxRibbonGroup>
            <DxRibbonGroup>
                <DxRibbonColorPaletteItem @bind-Value="color"
                                          @ref="colorPaletteReference">
                    <DxRibbonColorGroup Header="Universal"
                                        Colors="@DxColorPalettePresets.GetPalette(ColorPalettePresetType.Universal)" />
                </DxRibbonColorPaletteItem>
            </DxRibbonGroup>
        </DxRibbonTab>
    </DxRibbon>
    
    <p><b>First color group:</b> @colorGroupName</p>
    
    @code {
        string color = "";
        string colorGroupName = "";
        IRibbonColorPalette colorPaletteReference;
    
        void GetColorGroupName(RibbonItemClickEventArgs e) {
            colorGroupName = colorPaletteReference.ColorGroups.ElementAt(0).Header;
        }
    }
    
    See Also