[]
        
(Showing Draft Content)

C1.Win.Collections.ObjectModel.ObservableDictionary-2

ObservableDictionary<TKey, TValue> Class

Represents a generic collection of key/value pairs that provides notifications when items get added, removed, changed or when the whole list is refreshed.

Inheritance
ObservableDictionary<TKey, TValue>
Namespace: C1.Win.Collections.ObjectModel
Assembly: C1.Win.4.8.dll
Syntax
public class ObservableDictionary<TKey, TValue> : ObservableCollection<ObservableKeyValuePair<TKey, TValue>>, IList<ObservableKeyValuePair<TKey, TValue>>, ICollection<ObservableKeyValuePair<TKey, TValue>>, IList, ICollection, IReadOnlyList<ObservableKeyValuePair<TKey, TValue>>, IReadOnlyCollection<ObservableKeyValuePair<TKey, TValue>>, IEnumerable<ObservableKeyValuePair<TKey, TValue>>, INotifyCollectionChanged, INotifyPropertyChanged, IDictionary<TKey, TValue>, ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
Public Class ObservableDictionary(Of TKey, TValue)
    Inherits ObservableCollection(Of ObservableKeyValuePair(Of TKey, TValue))
    Implements IList(Of ObservableKeyValuePair(Of TKey, TValue)), ICollection(Of ObservableKeyValuePair(Of TKey, TValue)), IList, ICollection, IReadOnlyList(Of ObservableKeyValuePair(Of TKey, TValue)), IReadOnlyCollection(Of ObservableKeyValuePair(Of TKey, TValue)), IEnumerable(Of ObservableKeyValuePair(Of TKey, TValue)), INotifyCollectionChanged, INotifyPropertyChanged, IDictionary(Of TKey, TValue), ICollection(Of KeyValuePair(Of TKey, TValue)), IEnumerable(Of KeyValuePair(Of TKey, TValue)), IEnumerable
Type Parameters
Name Description
TKey

The type of keys in the dictionary.

TValue

The type of values in the dictionary.

Constructors

Name Description
ObservableDictionary()

Properties

Name Description
this[TKey]

Gets or sets the element with the specified key.

Keys

Gets an ICollection<T> containing the keys of the ObservableDictionary<TKey, TValue>.

Values

Gets an ICollection<T> containing the values in the ObservableDictionary<TKey, TValue>.

Methods

Name Description
Add(TKey, TValue)

Adds an element with the provided key and value to the ObservableDictionary<TKey, TValue>.

ClearItems()
ContainsKey(TKey)

Determines whether the ObservableDictionary<TKey, TValue> contains an element with the specified key.

GetEnumerator()
InsertItem(int, ObservableKeyValuePair<TKey, TValue>)
OnItemChanged(ItemChangedEventArgs<ObservableKeyValuePair<TKey, TValue>>)

Fires the ItemChanged event.

Remove(TKey)

Removes the element with the specified key from the ObservableDictionary<TKey, TValue>.

RemoveItem(int)
SetItem(int, ObservableKeyValuePair<TKey, TValue>)
TryGetValue(TKey, out TValue)

Gets the value associated with the specified key.

Events

Name Description
ItemChanged

Occurs when a item value changes.