IContextMenuItemCollection.Remove(String) Method
Removes an item with the specified name from an item collection.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
bool Remove(
string name
)
Parameters
Name | Type | Description |
---|---|---|
name | String | The item name. |
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
Remove
method overloads allow you to remove context menu items from item collections.
The following code snippet removes items from the main context menu:
<DxRichEdit CustomizeContextMenu="OnCustomizeContextMenu"/>
@code {
void OnCustomizeContextMenu(IContextMenuItemCollection items) {
// Removes the first item
items.Remove(0);
// Removes the "Decrease Indent" item
items.Remove(RichEditContextMenuItemNames.DecreaseIndent);
}
}
See Also