blazor-devexpress-dot-blazor-dot-dxribbontab-c225c56a.md
Specifies whether a Ribbon element is enabled.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(true)]
[Parameter]
public bool Enabled { get; set; }
| Type | Default | Description |
|---|---|---|
| Boolean | true |
false to disable an element; otherwise, true.
|
Set the Enabled property to false to disable the Ribbon element.
The following example disables different Ribbon elements ( 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;
}
Note
To hide the element, set the Visible property to false.
See Also