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

A collection that stores RadItem objects.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class CommandBarStripElementCollection : CollectionBase, IList, ICollection, IEnumerable

Inheritance: objectCollectionBaseCommandBarStripElementCollection

Implements: ICollectionIEnumerableIList

Inherited Members CollectionBase.Clear()CollectionBase.RemoveAt(int)CollectionBase.OnInsert(int, object)CollectionBase.InnerListCollectionBase.ListCollectionBase.CapacityCollectionBase.Count...

Constructors

Initializes an empty strip collection.

C#
public CommandBarStripElementCollection()

Initializes a strip collection containing the strips from the specified array.

C#
public CommandBarStripElementCollection(CommandBarStripElement[] value)
Parameters:valueCommandBarStripElement[]

The strips to add to the collection.

Initializes a strip collection containing the strips from another collection.

C#
public CommandBarStripElementCollection(CommandBarStripElementCollection value)
Parameters:valueCommandBarStripElementCollection

The collection whose strips are copied.

Initializes a collection whose strips are synchronized with the specified element's children.

C#
public CommandBarStripElementCollection(RadElement owner)
Parameters:ownerRadElement

The element that owns the collection strips.

Properties

Gets or sets the strip type used as the default when creating entries in the collection editor.

C#
public virtual Type DefaultType { get; set; }

Gets or sets an array of the excluded items' types for this collection.

C#
[Browsable(false)]
public virtual Type[] ExcludedTypes { get; set; }

Gets the first strip, or null when the collection is empty.

C#
[Browsable(false)]
public RadItem First { get; }

Gets or sets an array of the items' types in the collection.

C#
public virtual Type[] ItemTypes { get; set; }

Gets the last strip, or null when the collection is empty.

C#
[Browsable(false)]
public RadItem Last { get; }

Gets or sets the owner of the collection.

C#
public RadElement Owner { get; set; }

Gets or sets an array of the sealed items' types for this collection. That are types that are allowed but not their descendants.

C#
[Browsable(false)]
public virtual Type[] SealedTypes { get; set; }

Represents the entry at the specified index of the RadItem.

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

The zero-based index of the entry to locate in the collection.

Property Value:

The entry at the specified index of the collection.

Exceptions: ArgumentOutOfRangeException

index is outside the valid range of indexes for the collection.

Gets the first found item, with Name property equal to itemName specified, case-sensitive.

C#
public CommandBarStripElement this[string itemName] { get; }
Parameters:itemNamestring

item Name

Property Value:

RadItem if found, null (Nothing in VB.NET) otherwise

Methods

Adds a RadItem with the specified value to the Telerik.WinControls.RadItemCollection .

C#
public int Add(CommandBarStripElement value)
Parameters:valueCommandBarStripElement

The RadItem to add.

Returns:

int

The index at which the new element was inserted.

Adds the contents of another RadItemCollection to the end of the collection.

C#
public void AddRange(CommandBarStripElementCollection value)
Parameters:valueCommandBarStripElementCollection

A RadItemCollection containing the objects to add to the collection.

Copies the elements of an array to the end of the RadItemCollection.

C#
public void AddRange(params CommandBarStripElement[] value)
Parameters:valueCommandBarStripElement[]

An array of type RadItem containing the objects to add to the collection.

Moves any strip marked as the add-new item to the end of the collection without raising change notifications.

C#
public void AdjustNewItem()

Gets a value indicating whether the RadItemCollection contains the specified RadItem.

C#
public bool Contains(CommandBarStripElement value)
Parameters:valueCommandBarStripElement

The RadItem to locate.

Returns:

bool

true if the RadItem is contained in the collection; otherwise, false.

Copies the RadItemCollection values to a one-dimensional Array instance at the specified index.

C#
public void CopyTo(CommandBarStripElement[] array, int index)
Parameters:arrayCommandBarStripElement[]

The one-dimensional Array that is the destination of the values copied from RadItemCollection .

indexint

The index in array where copying begins.

Exceptions: ArgumentException

array is multidimensional.

-or-

The number of elements in the RadItemCollection is greater than the available space between index and the end of array.

ArgumentNullException

array is null.

ArgumentOutOfRangeException

index is less than array's lowbound.

Returns an enumerator for the strips in this collection.

C#
public CommandBarStripElementCollection.CommandBarStripElementEnumerator GetEnumerator()
Returns:

CommandBarStripElementCollection.CommandBarStripElementEnumerator

An enumerator that traverses the collection.

Returns the index of a RadItem in the RadItemCollection .

C#
public int IndexOf(CommandBarStripElement value)
Parameters:valueCommandBarStripElement

The RadItem to locate.

Returns:

int

The index of the RadItem of value in the RadItemCollection, if found; otherwise, -1.

Inserts a RadItem into the RadItemCollection at the specified index.

C#
public void Insert(int index, CommandBarStripElement value)
Parameters:indexint

The zero-based index where value should be inserted.

valueCommandBarStripElement

The RadItem to insert.

Reports the start of a clear operation and removes owned strips from the owner's child collection.

C#
protected override void OnClear()

Overrides: CollectionBase.OnClear()

Reports that all strips have been removed.

C#
protected override void OnClearComplete()

Overrides: CollectionBase.OnClearComplete()

Adds an inserted strip to the owner's child collection and reports the completed insertion.

C#
protected override void OnInsertComplete(int index, object value)
Parameters:indexint

The index where the strip was inserted.

valueobject

The inserted strip.

Overrides: CollectionBase.OnInsertComplete(int, object)

Handles strip-collection ownership bookkeeping and raises ItemsChanged unless notifications are suspended.

C#
protected virtual void OnItemsChanged(CommandBarStripElement target, ItemsChangeOperation operation)
Parameters:targetCommandBarStripElement

The affected strip, or null for collection-level changes.

operationItemsChangeOperation

The operation being reported.

Reports that removal is about to occur.

C#
protected override void OnRemove(int index, object value)
Parameters:indexint

The index of the strip being removed.

valueobject

The strip being removed.

Overrides: CollectionBase.OnRemove(int, object)

Removes the strip from the owner's child collection and reports the completed removal.

C#
protected override void OnRemoveComplete(int index, object value)
Parameters:indexint

The index from which the strip was removed.

valueobject

The removed strip.

Overrides: CollectionBase.OnRemoveComplete(int, object)

C#
protected override void OnSet(int index, object oldValue, object newValue)
Parameters:indexintoldValueobjectnewValueobject

Overrides: CollectionBase.OnSet(int, object, object)

Adds the replacement strip to the owner's child collection if it is not already a child.

C#
protected override void OnSetComplete(int index, object oldValue, object newValue)
Parameters:indexint

The index of the replaced strip.

oldValueobject

The strip previously at the index.

newValueobject

The replacement strip.

Overrides: CollectionBase.OnSetComplete(int, object, object)

Reports that sorting is about to occur.

C#
protected virtual void OnSort()

Notifies the owner element that the strip order has changed.

C#
protected void OnSortComplete()

Ensures that inserted values are command-bar strips.

C#
protected override void OnValidate(object value)
Parameters:valueobject

The value being validated.

Exceptions: InvalidOperationException

value is not a CommandBarStripElement.

Overrides: CollectionBase.OnValidate(object)

Removes a specific RadItem from the RadItemCollection .

C#
public void Remove(RadItem value)
Parameters:valueRadItem

The RadItem to remove from the RadItemCollection .

Removes one notification suspension, if any.

C#
public void ResumeNotifications()

Sorts the elements in the entire RadElementCollection using the IComparable implementation of each element.

C#
public void Sort()

Sorts the elements in the entire RadElementCollection using the specified comparer.

C#
public void Sort(IComparer comparer)
Parameters:comparerIComparer

The IComparer implementation to use when comparing elements.

Sorts the elements in a range of elements in RadElementCollection using the specified comparer.

C#
public void Sort(int index, int count, IComparer comparer)
Parameters:indexint

The zero-based starting index of the range to sort.

countint

The length of the range to sort.

comparerIComparer

The IComparer implementation to use when comparing elements.

Suppresses ItemsChanged callbacks and strip collection-owner updates until the matching call to ResumeNotifications(). Nested calls require a matching resume for each suspension; suppressed changes are not replayed.

C#
public void SuspendNotifications()

Retrieves an array of the items in the collection.

C#
public CommandBarStripElement[] ToArray()
Returns:

CommandBarStripElement[]

Events

Fires when item is changed.

C#
public event CommandBarStripElementCollectionItemChangedDelegate ItemsChanged