Represents a collection of ContextMenuTarget objects.
Definition
Namespace:Telerik.Web.UI
Assembly:Telerik.Web.UI.dll
Syntax:
public class ContextMenuTargetCollection : StateManagedCollection, IList, ICollection, IEnumerable, IStateManager
Inheritance: objectStateManagedCollectionContextMenuTargetCollection
Implements:
Inherited Members
Constructors
Initializes a new instance of the ContextMenuTargetCollection class.
public ContextMenuTargetCollection(RadContextMenu owner)
The owner of the collection.
Properties
Gets the ContextMenuTarget object at the specified index in the current ContextMenuTargetCollection.
public ContextMenuTarget this[int index] { get; set; }
The zero-based index of the ContextMenuTarget to retrieve.
Property Value:The ContextMenuTarget at the specified index in the current ContextMenuTargetCollection.
Methods
Appends the specified ContextMenuTarget object to the end of the current ContextMenuTargetCollection.
public void Add(ContextMenuTarget target)
The ContextMenuTarget to append to the end of the current ContextMenuTargetCollection.
Appends the specified array of ContextMenuTarget objects to the end of the current ContextMenuTargetCollection.
public void AddRange(IEnumerable<ContextMenuTarget> targets)
targets
IEnumerable<ContextMenuTarget>
The array of <xref href="Telerik.Web.UI.ContextMenuTarget?text=ContextMenuTarget" data-throw-if-not-resolved="false"></xref> o append to the end of the current
Determines whether the specified ContextMenuTarget object is in the current ContextMenuTargetCollection.
public bool Contains(ContextMenuTarget target)
The ContextMenuTarget object to find.
Returns:true if the current collection contains the specified ContextMenuTarget object;
otherwise, false.
Copies the contents of the current ContextMenuTargetCollection into the specified array of ContextMenuTarget objects.
public void CopyTo(ContextMenuTarget[] array, int index)
The target array.
indexintThe index to start copying from.
Determines the index of the specified ContextMenuTarget object in the collection.
public int IndexOf(ContextMenuTarget target)
The ContextMenuTarget to locate.
Returns:The zero-based index of tab within the current ContextMenuTargetCollection, if found; otherwise, -1.
Inserts the specified ContextMenuTarget object in the current ContextMenuTargetCollection at the specified index location.
public void Insert(int index, ContextMenuTarget target)
The zero-based index location at which to insert the ContextMenuTarget.
targetContextMenuTargetThe ContextMenuTarget to insert.
protected override void OnClear()
Overrides:
Removes the specified ContextMenuTarget object from the current ContextMenuTargetCollection.
public void Remove(ContextMenuTarget target)
The ContextMenuTarget object to remove.
Removes the ContextMenuTarget object at the specified index from the current ContextMenuTargetCollection.