Class DispatcherObservableCollection<TItem>
- Namespace
- Ecng.ComponentModel
- Assembly
- Ecng.ComponentModel.dll
The class represents a synchronized collection that can be used in WPF applications.
public class DispatcherObservableCollection<TItem> : BaseObservableCollection, ISynchronizedCollection<TItem>, ISynchronizedCollection, IListEx<TItem>, IList<TItem>, ICollectionEx<TItem>, ICollection<TItem>, IEnumerable<TItem>, IList, ICollection, IEnumerable
Type Parameters
TItem
- Inheritance
-
DispatcherObservableCollection<TItem>
- Implements
-
ISynchronizedCollection<TItem>IListEx<TItem>IList<TItem>ICollectionEx<TItem>ICollection<TItem>IEnumerable<TItem>
- Derived
- Inherited Members
- Extension Methods
Constructors
DispatcherObservableCollection(IDispatcher, IListEx<TItem>)
The class represents a synchronized collection that can be used in WPF applications.
public DispatcherObservableCollection(IDispatcher dispatcher, IListEx<TItem> items)
Parameters
dispatcherIDispatcheritemsIListEx<TItem>
Properties
Count
public override int Count { get; }
Property Value
Dispatcher
public IDispatcher Dispatcher { get; }
Property Value
IsReadOnly
public bool IsReadOnly { get; }
Property Value
this[int]
public TItem this[int index] { get; set; }
Parameters
indexint
Property Value
- TItem
Items
public IListEx<TItem> Items { get; }
Property Value
- IListEx<TItem>
SyncRoot
public SyncObject SyncRoot { get; }
Property Value
Methods
Add(TItem)
public virtual void Add(TItem item)
Parameters
itemTItem
AddRange(IEnumerable<TItem>)
public virtual void AddRange(IEnumerable<TItem> items)
Parameters
itemsIEnumerable<TItem>
Clear()
public virtual void Clear()
Contains(TItem)
public bool Contains(TItem item)
Parameters
itemTItem
Returns
CopyTo(TItem[], int)
public void CopyTo(TItem[] array, int arrayIndex)
Parameters
arrayTItem[]arrayIndexint
GetEnumerator()
public IEnumerator<TItem> GetEnumerator()
Returns
- IEnumerator<TItem>
IndexOf(TItem)
public int IndexOf(TItem item)
Parameters
itemTItem
Returns
Insert(int, TItem)
public void Insert(int index, TItem item)
Parameters
indexintitemTItem
Remove(TItem)
public virtual bool Remove(TItem item)
Parameters
itemTItem
Returns
RemoveAt(int)
public void RemoveAt(int index)
Parameters
indexint
RemoveRange(IEnumerable<TItem>)
Remove range of items.
public virtual void RemoveRange(IEnumerable<TItem> items)
Parameters
itemsIEnumerable<TItem>Items.
RemoveRange(int, int)
public override int RemoveRange(int index, int count)
Parameters
Returns
Events
AddedRange
public event Action<IEnumerable<TItem>> AddedRange
Event Type
- Action<IEnumerable<TItem>>
AfterUpdate
public event Action AfterUpdate
Event Type
BeforeUpdate
public event Action BeforeUpdate
Event Type
RemovedRange
public event Action<IEnumerable<TItem>> RemovedRange
Event Type
- Action<IEnumerable<TItem>>