Skip to main content
All docs
V25.2
  • DxRibbonItemBase.Enabled Property

    Specifies whether a Ribbon item is enabled.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(true)]
    [Parameter]
    public bool Enabled { get; set; }

    Property Value

    Type Default Description
    Boolean true

    false to disable an item; otherwise, true.

    Remarks

    Set the Enabled property to false to disable the Ribbon item.

    The following example disables different Ribbon items (Italic, font size selector, and color picker).

    <DxRibbon>
        <DxRibbonTab Text="Home">
            <DxRibbonGroup Text="Style">
                <DxRibbonItem Text="Bold" IconCssClass="dx-icon-bold" />
                <DxRibbonItem Text="Italic"
                              IconCssClass="dx-icon-italic"
                              Enabled="false" />
                <DxRibbonItem Text="Underline" IconCssClass="dx-icon-underline" />
                <DxRibbonComboBoxItem Data="FontSizes"
                                      Value="@CurrentFontSize"
                                      TextFieldName="@nameof(FontSizeInfo.Size)"
                                      NullText="Font Size"
                                      Enabled="false"
                                      Width="120px" />
                <DxRibbonColorPaletteItem @bind-Value="SelectedColor"
                                          Enabled="false" />
            </DxRibbonGroup>
        </DxRibbonTab>
    </DxRibbon>
    
    @code {
        string SelectedColor = "";
        private FontSizeInfo CurrentFontSize { get; set; }
        private IEnumerable<FontSizeInfo> FontSizes => FontSizeInfo.DefaultFontSizes;
    }
    

    Disable Ribbon Elements

    Note

    To hide an item, set the Visible property to false.

    See Also