Click or drag to resize
ObservableDictionaryTKey, TValue Class
An implementation of IDictionary<TKey><TValue> which fires INotifyCollectionChanged and INotifyPropertyChanged when required. This allows the dictionary to be used as a data source for Silverlight and WPF user controls implementing data-binding.
Inheritance Hierarchy
SystemObject
  Sdl.FileTypeSupport.Framework.Core.SettingsObservableDictionaryTKey, TValue
    Sdl.FileTypeSupport.Framework.Core.Utilities.FormattingFormattingGroup

Namespace: Sdl.FileTypeSupport.Framework.Core.Settings
Assembly: Sdl.FileTypeSupport.Framework.Core.Settings (in Sdl.FileTypeSupport.Framework.Core.Settings.dll) Version: 1.0.0.0 (1.0.2551.2)
Syntax
[SerializableAttribute]
public class ObservableDictionary<TKey, TValue> : IDictionary<TKey, TValue>, 
	ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
	IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, ISerializable

Type Parameters

TKey
The type of the key used in the dictionary.
TValue
The type of the value used in the dictionary.

The ObservableDictionaryTKey, TValue type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCount
The number of elements contained in the dictionary.
Public propertyIsReadOnly
Determines whether the dictionary is read-only.
Public propertyItem
Retrieves the dictionary element value at the specified key.
Public propertyKeys
A collection of all element keys contained in the dictionary.
Public propertyValues
A collection of all element values contained in the dictionary.
Top
Methods
  NameDescription
Public methodAdd(KeyValuePairTKey, TValue)
Adds a new element to the dictionary.
Public methodAdd(TKey, TValue)
Adds an element with the key and value to the dictionary or updates the value if the key already exists.
Public methodClear
Removes all elements from the dictionary.
Protected methodClearDictionaryItemSettings
Removes all saved items belonging to this dictionary from the stored settings group. This is called from SaveToSettingsGroup(ISettingsGroup, String) to make sure that the settings being updated are all saved cleanly.
Public methodContains
Determines whether the dictionary contains the specified item.
Public methodContainsKey
Determines whether the dictionary contains an element with the specified key.
Public methodCopyTo
Copies the dictionary elements into the provided array, starting from the specified index in the array.
Protected methodGetDictionaryItemFromSettingsT
Gets the setting for the dictionary item from the settings group and populates it.
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetObjectData
Populates serialization information with the elements in the dictionary.
Public methodPopulateFromSettingsGroup
Restores the dictionary from the settings group and populates itself using the setting ID as its base.
Public methodRemove(KeyValuePairTKey, TValue)
Removes the specified item from the dictionary.
Public methodRemove(TKey)
Removes the element with the specified key from the dictionary.
Public methodSaveToSettingsGroup
Saves this dictionary to the settings group using the setting ID as a base.
Public methodTryGetValue
Gets the value of the element with the specified key if it exists.
Top
Events
  NameDescription
Public eventCollectionChanged
Event that is fired whenever the contents of the collection are changed.
Public eventPropertyChanged
Event that is fired whenever the value of a property of the collection is changed.
Top
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments