New to Telerik UI for WinForms? Start a free 30-day trial

Collection of context menu groups.

Definition

Namespace:Telerik.WinForms.RichTextEditor.RichTextBoxUI.Menus

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class ContextMenuGroupCollection : IEnumerable

Inheritance: objectContextMenuGroupCollection

Implements: IEnumerable

Constructors

Initializes a new instance of the ContextMenuGroupCollection class.

C#
public ContextMenuGroupCollection()

Properties

Gets the number of groups. Empty or null groups are omitted when the context menu is populated.

C#
public int Count { get; }

Gets or replaces the group at the specified position in the context-menu display order.

C#
public ContextMenuGroup this[int index] { get; set; }
Parameters:indexint

The zero-based position of the group.

Property Value:

The group at the specified position.

Methods

Appends a group after the groups already in the collection.

C#
public void Add(ContextMenuGroup item)
Parameters:itemContextMenuGroup

The group to add.

Removes all groups from the collection.

C#
public void Clear()

Determines whether the specified group is in the collection.

C#
public bool Contains(ContextMenuGroup item)
Parameters:itemContextMenuGroup

The group to locate.

Returns:

bool

true if the group is in the collection; otherwise, false.

Copies the groups to an array, preserving their display order.

C#
public void CopyTo(ContextMenuGroup[] array, int arrayIndex)
Parameters:arrayContextMenuGroup[]

The destination array.

arrayIndexint

The zero-based array position at which copying begins.

Returns an enumerator that visits the groups in display order.

C#
public IEnumerator<ContextMenuGroup> GetEnumerator()
Returns:

IEnumerator<ContextMenuGroup>

An enumerator over the groups in this collection.

Returns the position of a group in the collection, or -1 if it is not present.

C#
public int IndexOf(ContextMenuGroup item)
Parameters:itemContextMenuGroup

The group to locate.

Returns:

int

The group's zero-based position, or -1 if it is not in the collection.

Inserts a group at the specified position, changing the order and separator placement of the displayed groups.

C#
public void Insert(int index, ContextMenuGroup item)
Parameters:indexint

The zero-based position at which to insert the group.

itemContextMenuGroup

The group to insert.

Removes the first occurrence of the specified group.

C#
public bool Remove(ContextMenuGroup item)
Parameters:itemContextMenuGroup

The group to remove.

Returns:

bool

true if the group was removed; otherwise, false.

Removes the group at the specified position.

C#
public void RemoveAt(int index)
Parameters:indexint

The zero-based position of the group to remove.