Show / Hide Table of Contents

Class ResourceDictionary

Implements dictionary for resources. This collection is thread safe.

Inheritance
System.Object
ResourceDictionary
Implements
System.Collections.IDictionary
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
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: EmptyKeys.UserInterface
Assembly: EmptyKeys.UserInterface.dll
Syntax
public class ResourceDictionary : IDictionary, ICollection, IEnumerable

Constructors

ResourceDictionary()

Initializes a new instance of the ResourceDictionary class.

Declaration
public ResourceDictionary()

Properties

Count

Gets the number of elements contained in the System.Collections.ICollection.

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

The number of elements contained in the System.Collections.ICollection.

DefaultDictionary

Gets the default dictionary.

Declaration
public static ResourceDictionary DefaultDictionary { get; set; }
Property Value
Type Description
ResourceDictionary

The default dictionary.

IsFixedSize

Gets a value indicating whether the System.Collections.IDictionary object has a fixed size.

Declaration
public bool IsFixedSize { get; }
Property Value
Type Description
System.Boolean

true if the System.Collections.IDictionary object has a fixed size; otherwise, false.

IsReadOnly

Gets a value indicating whether the System.Collections.IDictionary object is read-only.

Declaration
public bool IsReadOnly { get; }
Property Value
Type Description
System.Boolean

true if the System.Collections.IDictionary object is read-only; otherwise, false.

IsSynchronized

Gets a value indicating whether access to the System.Collections.ICollection is synchronized (thread safe).

Declaration
public bool IsSynchronized { get; }
Property Value
Type Description
System.Boolean

true if access to the System.Collections.ICollection is synchronized (thread safe); otherwise, false.

Item[Object]

Gets or sets the element with the specified key.

Declaration
public object this[object key] { get; set; }
Parameters
Type Name Description
System.Object key

The key.

Property Value
Type Description
System.Object

Keys

Gets an System.Collections.ICollection object containing the keys of the System.Collections.IDictionary object.

Declaration
public ICollection Keys { get; }
Property Value
Type Description
System.Collections.ICollection

An System.Collections.ICollection object containing the keys of the System.Collections.IDictionary object.

MergedDictionaries

Gets the merged dictionaries.

Declaration
public List<ResourceDictionary> MergedDictionaries { get; }
Property Value
Type Description
System.Collections.Generic.List<ResourceDictionary>

The merged dictionaries.

SyncRoot

Gets an object that can be used to synchronize access to the System.Collections.ICollection.

Declaration
public object SyncRoot { get; }
Property Value
Type Description
System.Object

An object that can be used to synchronize access to the System.Collections.ICollection.

Values

Gets an System.Collections.ICollection object containing the values in the System.Collections.IDictionary object.

Declaration
public ICollection Values { get; }
Property Value
Type Description
System.Collections.ICollection

An System.Collections.ICollection object containing the values in the System.Collections.IDictionary object.

Methods

Add(Object, Object)

Adds an element with the provided key and value to the System.Collections.IDictionary object.

Declaration
public void Add(object key, object value)
Parameters
Type Name Description
System.Object key

The System.Object to use as the key of the element to add.

System.Object value

The System.Object to use as the value of the element to add.

Clear()

Removes all elements from the System.Collections.IDictionary object.

Declaration
public void Clear()

Contains(Object)

Determines whether the System.Collections.IDictionary object contains an element with the specified key.

Declaration
public bool Contains(object key)
Parameters
Type Name Description
System.Object key

The key to locate in the System.Collections.IDictionary object.

Returns
Type Description
System.Boolean

true if the System.Collections.IDictionary contains an element with the key; otherwise, false.

CopyTo(Array, Int32)

Copies the elements of the System.Collections.ICollection to an System.Array, starting at a particular System.Array index.

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

The one-dimensional System.Array that is the destination of the elements copied from System.Collections.ICollection. The System.Array must have zero-based indexing.

System.Int32 index

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

Exceptions
Type Condition
System.NotImplementedException

GetEnumerator()

Returns an System.Collections.IDictionaryEnumerator object for the System.Collections.IDictionary object.

Declaration
public IDictionaryEnumerator GetEnumerator()
Returns
Type Description
System.Collections.IDictionaryEnumerator

An System.Collections.IDictionaryEnumerator object for the System.Collections.IDictionary object.

Remove(Object)

Removes the element with the specified key from the System.Collections.IDictionary object.

Declaration
public void Remove(object key)
Parameters
Type Name Description
System.Object key

The key of the element to remove.

TryGetValue(Object, out Object)

Tries the get value.

Declaration
public bool TryGetValue(object key, out object value)
Parameters
Type Name Description
System.Object key

The key.

System.Object value

The value.

Returns
Type Description
System.Boolean

Explicit Interface Implementations

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

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

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

Implements

System.Collections.IDictionary
System.Collections.ICollection
System.Collections.IEnumerable
Back to top Generated by DocFX