Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxRibbonColorPaletteItem.ChildContent Property

Specifies the collection of color groups.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public override RenderFragment ChildContent { get; set; }

#Property Value

Type Description
RenderFragment

The color group collection.

#Remarks

The ChildContent component parameter can store custom component content that does not belong to other component’s RenderFragment properties as shown below:

Razor
<DxRibbon>
    <DxRibbonColorPaletteItem @bind-Value="CurrentColor">
        <ChildContent>
            <DxRibbonColorGroup Header="Pastel" Colors="@DxColorPalettePresets.GetPalette(ColorPalettePresetType.Pastel)" />
            <DxRibbonColorGroup Header="Aqua" Colors="@AquaColors" />
            <DxRibbonColorGroup Header="Pink" Colors="@PinkColors" />
        </ChildContent>
    </DxRibbonColorPaletteItem>
</DxRibbon>

Note

Since ChildContent contains nested markup of its parent class, the template content must conform to HTML semantics.

This property is equivalent to the Groups property. However, we recommend that you explicitly specify Groups in the markup. This notation allows you to specify the IconTemplate on the DxRibbonColorPaletteItem level.

Razor
<DxRibbon>
    <DxRibbonColorPaletteItem @bind-Value="CurrentColor">
        <Groups>
            <DxRibbonColorGroup Header="Pastel" Colors="@DxColorPalettePresets.GetPalette(ColorPalettePresetType.Pastel)" />
            <DxRibbonColorGroup Header="Aqua" Colors="@AquaColors" />
            <DxRibbonColorGroup Header="Pink" Colors="@PinkColors" />
        </Groups>
    </DxRibbonColorPaletteItem>
</DxRibbon>
See Also