IContextMenuItemCollection.Remove(Int32) Method
Removes an item with the specified index from an item collection.
Namespace: DevExpress.Blazor.Office
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
bool Remove(
int index
)
Parameters
Name | Type | Description |
---|---|---|
index | Int32 | The item index. |
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