Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IContextMenuItemCollection.Count Property

Returns the number of items in the collection.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
int Count { get; }

#Property Value

Type Description
Int32

The number of items.

#Remarks

The following code snippet uses the Count property to position a custom item in the item collection:

Razor
<DxRichEdit CustomizeContextMenu=OnCustomizeContextMenu />

@code {
    void OnCustomizeContextMenu(IContextMenuItemCollection items) {
        var myCustomItem = items.AddCustomItem(items.Count, "My custom item");
    }
}
See Also