WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ItemCollection

    Show / Hide Table of Contents

    Class ItemCollection

    Collection which holds the Carousel's child items

    Inheritance
    System.Object
    ItemCollection
    Implements
    System.Collections.Generic.IList<System.Windows.Forms.Control>
    System.Collections.Generic.ICollection<System.Windows.Forms.Control>
    System.Collections.Generic.IEnumerable<System.Windows.Forms.Control>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ItemCollection : IList<Control>, ICollection<Control>, IEnumerable<Control>, IList, ICollection, IEnumerable

    Properties

    Count

    Gets the number of elements contained in the collection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Item[Int32]

    Gets or sets the element at the specified index.

    Declaration
    public Control this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to get or set.

    Property Value
    Type Description
    System.Windows.Forms.Control

    The element at the specified index.

    Methods

    Add(Control)

    Adds an item to the collection.

    Declaration
    public void Add(Control item)
    Parameters
    Type Name Description
    System.Windows.Forms.Control item

    The item which is added to the collection.

    AsEnumerable()

    Returns the Items collectionList.

    Declaration
    public IEnumerable<Control> AsEnumerable()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Windows.Forms.Control>

    CollectionList which contains items.

    Clear()

    Removes all items from the collection.

    Declaration
    public void Clear()

    Contains(Control)

    Determines whether the collection contains a specific value.

    Declaration
    public bool Contains(Control item)
    Parameters
    Type Name Description
    System.Windows.Forms.Control item

    The object to locate in the collection.

    Returns
    Type Description
    System.Boolean

    True if the item is found in the collection, otherwise false.

    GetEnumerator()

    Returns an enumerator that iterates through a collection.

    Declaration
    public IEnumerator<Control> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Windows.Forms.Control>

    An IEnumerator object that can be used to iterate through the collection.

    IndexOf(Control)

    Determines the index of a specific item in the list.

    Declaration
    public int IndexOf(Control item)
    Parameters
    Type Name Description
    System.Windows.Forms.Control item

    The object to locate in the list.

    Returns
    Type Description
    System.Int32

    The index of the item if found in the list, otherwise -1.

    Insert(Int32, Control)

    Inserts an item to the list at the specified index.

    Declaration
    public void Insert(int index, Control item)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index at which item should be inserted.

    System.Windows.Forms.Control item

    The object to insert into the list.

    Remove(Control)

    Removes the first occurrence of a specific object from the collection.

    Declaration
    public bool Remove(Control item)
    Parameters
    Type Name Description
    System.Windows.Forms.Control item

    The object to remove from the collection.

    Returns
    Type Description
    System.Boolean

    True if the item was successfully removed from the collection, otherwise false. This method also returns false if the item is not found in the original collection.

    RemoveAt(Int32)

    Removes the item at the specified index.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the item to remove.

    Sort()

    Sorts the items in the collection

    Declaration
    public void Sort()

    Sort(IComparer<Control>)

    Sorts the items in the collection using the provided comparer.

    Declaration
    public void Sort(IComparer<Control> comparer)
    Parameters
    Type Name Description
    System.Collections.Generic.IComparer<System.Windows.Forms.Control> comparer

    The comparer used to compare items.

    Explicit Interface Implementations

    ICollection<Control>.CopyTo(Control[], Int32)

    Copies the elements of the collection to an array, starting at a particular array index.

    Declaration
    void ICollection<Control>.CopyTo(Control[] array, int index)
    Parameters
    Type Name Description
    System.Windows.Forms.Control[] array

    The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.

    System.Int32 index

    The zero-based index in array at which copying begins.

    ICollection<Control>.IsReadOnly

    Gets a value indicating whether the collection is read-only.

    Declaration
    bool ICollection<Control>.IsReadOnly { get; }
    Returns
    Type Description
    System.Boolean

    ICollection.CopyTo(Array, Int32)

    Copies the elements of the collection to an array, starting at a particular array index.

    Declaration
    void ICollection.CopyTo(Array array, int index)
    Parameters
    Type Name Description
    System.Array array

    The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing.

    System.Int32 index

    The zero-based index in array at which copying begins

    ICollection.IsSynchronized

    Gets a value indicating whether access to the collection is synchronized (thread safe).

    Declaration
    bool ICollection.IsSynchronized { get; }
    Returns
    Type Description
    System.Boolean

    ICollection.SyncRoot

    Gets an object that can be used to synchronize access to the collection.

    Declaration
    object ICollection.SyncRoot { get; }
    Returns
    Type Description
    System.Object

    IEnumerable.GetEnumerator()

    Returns an enumerator that iterates through a collection.

    Declaration
    IEnumerator IEnumerable.GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    An IEnumerator object that can be used to iterate through the collection.

    IList.Add(Object)

    Adds an item to the list.

    Declaration
    int IList.Add(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The item which is added to the list.

    Returns
    Type Description
    System.Int32

    The position at which the item was inserted.

    IList.Contains(Object)

    Determines whether the list contains a specific value.

    Declaration
    bool IList.Contains(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The object to locate in the list.

    Returns
    Type Description
    System.Boolean

    True if an instance of the item was found in the list, otherwise false.

    IList.get_Item(Int32)

    Declaration
    object IList.get_Item(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Returns
    Type Description
    System.Object

    IList.IndexOf(Object)

    Determines the index of a specific item in the list.

    Declaration
    int IList.IndexOf(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The object to locate in the list.

    Returns
    Type Description
    System.Int32

    The index of the item if found in the list, otherwise -1.

    IList.Insert(Int32, Object)

    Inserts an item to the list at the specified index.

    Declaration
    void IList.Insert(int index, object obj)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index at which item should be inserted.

    System.Object obj

    The object to insert into the list.

    IList.IsFixedSize

    Gets a value indicating whether the list has a fixed size.

    Declaration
    bool IList.IsFixedSize { get; }
    Returns
    Type Description
    System.Boolean

    IList.IsReadOnly

    Gets a value indicating whether the list is read-only.

    Declaration
    bool IList.IsReadOnly { get; }
    Returns
    Type Description
    System.Boolean

    IList.Item[Int32]

    Gets or sets the element at the specified index.

    Declaration
    object IList.this[] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to get or set.

    Returns
    Type Description
    System.Object

    The element at the specified index.

    IList.Remove(Object)

    Removes the first occurrence of a specific object from the collection.

    Declaration
    void IList.Remove(object obj)
    Parameters
    Type Name Description
    System.Object obj

    IList.set_Item(Int32, Object)

    Declaration
    void IList.set_Item(int index, object value)
    Parameters
    Type Name Description
    System.Int32 index
    System.Object value

    Implements

    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.IEnumerable

    Extension Methods

    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.MoveTo(IList, Int32, Int32)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany(IEnumerable, Type, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, Func<String, Expression>, String[])
    QueryableExtensions.GroupByMany(IEnumerable, Type, List<SortDescriptor>, Func<String, Expression>, String[])
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved