IContextMenuItem.IconCssClass Property
Specifies the CSS class of the item’s icon.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.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
IconCssClassproperty is not in effect if the IconUrl property value differs fromnullor empty string.
The following code snippets specify icon CSS classes for context menu items:
<DxRichEdit CustomizeContextMenu="CustomizeContextMenu" />
@code {
void CustomizeContextMenu(IContextMenuItemCollection items) {
var searchItem = items.AddCustomItem(0, "Google Search...");
searchItem.IconCssClass = "search-icon";
}
}
Refer to CustomizeContextMenu event descriptions for additional information and examples:
See Also