Skip to main content
All docs
V25.2
  • IRibbonToggleGroup Interface

    Defines the programmatic interface for the DxRibbonToggleGroup component.

    Namespace: DevExpress.Blazor.Ribbon

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public interface IRibbonToggleGroup :
        IRibbonGroupElement,
        IRibbonElement,
        IRibbonNode,
        IRibbonGroupItemCollection

    Remarks

    Use the IRibbonToggleGroup interface to read and modify DxRibbonToggleGroup component properties at runtime and customize the Ribbon toggle group appearance and behavior.

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

    The following code snippet gets an IRibbonToggleGroup reference and selects the third item in the toggle group:

    <DxRibbon>
        <DxRibbonTab Text="Home">
            <DxRibbonGroup>
                <DxRibbonItem Text="Align Right"
                              Click="CheckItem" />
                <DxRibbonToggleGroup @ref="toggleGroupRef">
                    <DxRibbonToggleItem Text="Left"
                                        IconCssClass="dx-icon-alignleft" />
                    <DxRibbonToggleItem Text="Center"
                                        IconCssClass="dx-icon-aligncenter" />
                    <DxRibbonToggleItem Text="Right"
                                        IconCssClass="dx-icon-alignright" />
                </DxRibbonToggleGroup>
            </DxRibbonGroup>
        </DxRibbonTab>
    </DxRibbon>
    
    @code {
        IRibbonToggleGroup toggleGroupRef;
    
        void CheckItem(RibbonItemClickEventArgs e) {
            toggleGroupRef.ToggleItems.ElementAt(2).Checked = true;
        }
    }
    
    See Also