Skip to main content
All docs
V24.1

IContextMenuItemCollection.Count Property

Returns the number of items in the collection.

Namespace: DevExpress.Blazor.Office

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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:

<DxRichEdit CustomizeContextMenu=OnCustomizeContextMenu />

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