menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ObservableCollectionBase<T> - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ObservableCollectionBase<T>

    Base observable generic collection.

    Inheritance
    System.Object
    System.Collections.ObjectModel.Collection<T>
    ObservableCollectionBase<T>
    CustomButtonCollection
    ObservableCollection<U>
    Implements
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Inherited Members
    System.Collections.ObjectModel.Collection<T>.Add(T)
    System.Collections.ObjectModel.Collection<T>.Clear()
    System.Collections.ObjectModel.Collection<T>.ClearItems()
    System.Collections.ObjectModel.Collection<T>.Contains(T)
    System.Collections.ObjectModel.Collection<T>.CopyTo(T[], System.Int32)
    System.Collections.ObjectModel.Collection<T>.Count
    System.Collections.ObjectModel.Collection<T>.GetEnumerator()
    System.Collections.ObjectModel.Collection<T>.IndexOf(T)
    System.Collections.ObjectModel.Collection<T>.Insert(System.Int32, T)
    System.Collections.ObjectModel.Collection<T>.Item[System.Int32]
    System.Collections.ObjectModel.Collection<T>.Items
    System.Collections.ObjectModel.Collection<T>.Remove(T)
    System.Collections.ObjectModel.Collection<T>.RemoveAt(System.Int32)
    System.Collections.ObjectModel.Collection<T>.System.Collections.Generic.ICollection<T>.IsReadOnly
    System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
    System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.IsSynchronized
    System.Collections.ObjectModel.Collection<T>.System.Collections.ICollection.SyncRoot
    System.Collections.ObjectModel.Collection<T>.System.Collections.IEnumerable.GetEnumerator()
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Add(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Contains(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.get_Item(System.Int32)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IndexOf(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Insert(System.Int32, System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IsFixedSize
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.IsReadOnly
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Item[System.Int32]
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.Remove(System.Object)
    System.Collections.ObjectModel.Collection<T>.System.Collections.IList.set_Item(System.Int32, System.Object)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Tools.Navigation
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ObservableCollectionBase<T> : Collection<T>, IList<T>, ICollection<T>, IList, ICollection, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
    Type Parameters
    Name Description
    T

    Observable CollectionBase

    Constructors

    ObservableCollectionBase()

    Declaration
    public ObservableCollectionBase()

    Methods

    AddRange(IEnumerable<T>)

    Adds the elements of the specified collection to the end of the .

    Declaration
    public virtual void AddRange(IEnumerable<T> collection)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> collection

    The collection whose elements should be added to the end of the . The collection itself cannot be null reference (Nothing in Visual Basic).

    FireCollectionChangedEvent(CollectionChangeAction, T)

    Fires CollectionChanged event.

    Declaration
    protected void FireCollectionChangedEvent(CollectionChangeAction action, T item)
    Parameters
    Type Name Description
    System.ComponentModel.CollectionChangeAction action

    One of the System.ComponentModel.CollectionChangeActionvalues that specifies how the collection changed.

    T item

    An that specifies the instance of the collection where the change occurred.

    InsertItem(Int32, T)

    Inserts an element into the System.Collections.ObjectModel.Collection at the specified index.

    Declaration
    protected override void InsertItem(int index, T item)
    Parameters
    Type Name Description
    System.Int32 index

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

    T item

    The object to insert. The value can be null for reference types.

    Overrides
    System.Collections.ObjectModel.Collection<T>.InsertItem(System.Int32, T)
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is less than zero.-or-index is greater than System.Collections.ObjectModel.Collection.Count.

    InsertRange(Int32, IEnumerable<T>)

    Inserts the elements of a collection into the at the specified index.

    Declaration
    public virtual void InsertRange(int index, IEnumerable<T> collection)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index at which the new elements should be inserted.

    System.Collections.Generic.IEnumerable<T> collection

    The collection whose elements should be inserted into the . The collection itself cannot be null null reference (Nothing in Visual Basic).

    RemoveItem(Int32)

    Removes the element at the specified index of the System.Collections.ObjectModel.Collection.

    Declaration
    protected override void RemoveItem(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to remove.

    Overrides
    System.Collections.ObjectModel.Collection<T>.RemoveItem(System.Int32)
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is less than zero.-or-index is equal to or greater than System.Collections.ObjectModel.Collection.Count.

    SetItem(Int32, T)

    Replaces the element at the specified index.

    Declaration
    protected override void SetItem(int index, T item)
    Parameters
    Type Name Description
    System.Int32 index

    The zero-based index of the element to replace.

    T item

    The new value for the element at the specified index. The value can be null for reference types.

    Overrides
    System.Collections.ObjectModel.Collection<T>.SetItem(System.Int32, T)
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is less than zero.-or-index is greater than System.Collections.ObjectModel.Collection.Count.

    Events

    CollectionChanged

    Occurs when collection is changed.

    Declaration
    public event CollectionChangeEventHandler CollectionChanged
    Event Type
    Type
    System.ComponentModel.CollectionChangeEventHandler

    Implements

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

    Extension Methods

    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Average<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Sum<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Max<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Int16>)
    EnumerableExtensions.Min<TSource>(IEnumerable<TSource>, Func<TSource, Nullable<Int16>>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>)
    EnumerableExtensions.OrderBy<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.OrderByDescending<T>(IEnumerable<T>, String, Func<String, Object, Object>, IComparer<Object>)
    EnumerableExtensions.GetElementType(IEnumerable)
    EnumerableExtensions.GetItemPropertyInfo(IEnumerable)
    FunctionalExtensions.ForEach<T>(IEnumerable, Action<T>)
    FunctionalExtensions.ForEach<T>(IEnumerable<T>, Action<T>)
    FunctionalExtensions.ToList<T>(IEnumerable)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>)
    FunctionalExtensions.IterateIndex<T>(IEnumerable<T>, Action<Int32, T>, Int32)
    FunctionalExtensions.Zip<TFirst, TSecond, TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)
    FunctionalExtensions.Fold<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldLeft<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.FoldRight<T, U>(IEnumerable<U>, Func<T, U, T>, T)
    FunctionalExtensions.MoveTo(IList, Int32, Int32)
    FunctionalExtensions.ToObservableCollection<T>(IEnumerable<T>)
    QueryableExtensions.OfQueryable(IEnumerable)
    QueryableExtensions.OfQueryable(IEnumerable, Type)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable, Type, List<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, String[], IEnumerable<Func<TElement, Object>>)
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Dictionary<String, IComparer<Object>>, List<String>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, List<SortDescriptor>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, Func<TElement, Object>[])
    QueryableExtensions.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<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[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, Int32, Func<TElement, Object>[])
    PivotExtension.GroupByMany<TElement>(IEnumerable<TElement>, IEnumerable<Func<TElement, Object>>)
    ChartExtensionUtils.DistinctBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved