Skip to main content

IBarItemWithImageBase.IconCssClass Property

Specifies the CSS class of the item’s icon.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

string IconCssClass { get; set; }

Property Value

Type Description
String

The icon’s CSS class.

Remarks

DevExpress Blazor components support pre-defined icon sets (such as Iconic or Bootstrap-recommended libraries) and custom icon libraries. Refer to the following topic for more information: Icons.

Use any of the following properties to set an item’s icon:

IconUrl
Specifies the URL of the item’s icon.
IconCssClass
Specifies the CSS class of the item’s icon. The IconCssClass property is not in effect if the IconUrl property value differs from null or empty string.

The following code snippet specifies the CSS class of the ClipboardMenu item’s icon:

<DxRichEdit CustomizeRibbon=OnCustomizeRibbon />

@code {
    void OnCustomizeRibbon(IRibbon ribbon) {
        string tabName = RichEditRibbonTabNames.Home;
        string groupName = RichEditRibbonGroupNames.HomeUndoClipboard;
        string itemName = RichEditBarItemNames.ClipboardMenu;
        IBarItem clipboardMenu = ribbon.Tabs[tabName].Groups[groupName].Items[itemName];
        if (clipboardMenu.Type == BarItemTypes.DropDown) {
            IBarDropDown clipboardMenuDropDown = (IBarDropDown)clipboardMenu;
            clipboardMenuDropDown.IconCssClass = "copy";
        }
    }
}
See Also