Back to Devexpress

IRibbonColorGroup Interface

blazor-devexpress-dot-blazor-dot-ribbon-5bd88b39.md

latest1.8 KB
Original Source

IRibbonColorGroup Interface

Defines the programmatic interface for the DxRibbonColorGroup component.

Namespace : DevExpress.Blazor.Ribbon

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public interface IRibbonColorGroup :
    IRibbonNode

Remarks

Use the IRibbonColorGroup interface to read and modify DxRibbonColorGroup component properties at runtime and customize the Ribbon color palette item’s color group’s appearance and behavior.

Obtain an IRibbonColorGroup instance with the @ref attribute or from Ribbon event arguments.

razor
<DxRibbon>
    <DxRibbonTab Text="Home">
        <DxRibbonGroup>
            <DxRibbonItem Text="Get Color Group Name"
                          Click="GetColorGroupName" />
        </DxRibbonGroup>
        <DxRibbonGroup>
            <DxRibbonColorPaletteItem @bind-Value="color">
                <DxRibbonColorGroup Header="Universal"
                                    Colors="@DxColorPalettePresets.GetPalette(ColorPalettePresetType.Universal)"
                                    @ref="colorGroupReference" />
            </DxRibbonColorPaletteItem>
        </DxRibbonGroup>
    </DxRibbonTab>
</DxRibbon>

<p><b>First color group:</b> @colorGroupName</p>

@code {
    string color = "";
    string colorGroupName = "";
    IRibbonColorGroup colorGroupReference;

    void GetColorGroupName(RibbonItemClickEventArgs e) {
        colorGroupName = colorGroupReference.Header;
    }
}

See Also

IRibbonColorGroup Members

DevExpress.Blazor.Ribbon Namespace