ContextMenuGroup
Collection of context menu items.
Definition
Namespace:Telerik.WinForms.RichTextEditor.RichTextBoxUI.Menus
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class ContextMenuGroup : IEnumerable
Inheritance: objectContextMenuGroup
Implements:
Constructors
Initializes a new instance of the ContextMenuGroup class.
public ContextMenuGroup()
Initializes a new instance of the ContextMenuGroup class.
public ContextMenuGroup(ContextMenuGroupType type, string name)
The type of the group.
namestringThe name of the group.
Initializes a new instance of the ContextMenuGroup class.
public ContextMenuGroup(ContextMenuGroupType type)
The type of the group.
Initializes a new instance of the ContextMenuGroup class.
Properties
Gets the number of menu items in the group. Empty groups are omitted when the context menu is populated.
public int Count { get; }
Gets the name of the group.
public string Name { get; }
The name of the group.
Gets or replaces the menu item at the specified position in this group's display order.
public RadMenuItemBase this[int index] { get; set; }
The zero-based position of the item.
Property Value:The menu item at the specified position.
Gets the type of the group.
public ContextMenuGroupType Type { get; }
The type of the group.
Methods
Appends a menu item after the items already in this group.
Removes all menu items from the group; an empty group is omitted when the context menu is populated.
public void Clear()
Determines whether the specified menu item is in this group.
public bool Contains(RadMenuItemBase item)
The item to locate.
Returns:Copies the menu items to an array, preserving their display order.
public void CopyTo(RadMenuItemBase[] array, int arrayIndex)
The destination array.
arrayIndexintThe zero-based array position at which copying begins.
Returns an enumerator that visits the menu items in display order.
public IEnumerator<RadMenuItemBase> GetEnumerator()
IEnumerator<RadMenuItemBase>
An enumerator over the menu items in this group.
Returns the position of an item in the group, or -1 if the item is not present.
public int IndexOf(RadMenuItemBase item)
The item to locate.
Returns:The item's zero-based position, or -1 if it is not in the group.
Inserts a menu item at the specified position, shifting later items in the group's display order.
public void Insert(int index, RadMenuItemBase item)
The zero-based position at which to insert the item.
itemRadMenuItemBaseThe menu item to insert.
Removes the first occurrence of the specified menu item.
public bool Remove(RadMenuItemBase item)
The item to remove.
Returns:Removes the menu item at the specified position.
public void RemoveAt(int index)
The zero-based position of the item to remove.