ResourceDictionary ResourceDictionary Class


An IDictionary that maps identifier strings to arbitrary resource objects.

public class ResourceDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string,object>>, System.Collections.Generic.IDictionary<string,object>, Xamarin.Forms.Internals.IResourceDictionary
type ResourceDictionary = class
    interface IResourceDictionary
    interface seq<KeyValuePair<string, obj>>
    interface IEnumerable
    interface IDictionary<string, obj>
    interface ICollection<KeyValuePair<string, obj>>


ResourceDictionary() ResourceDictionary()

Creates a new empty ResourceDictionary object.


Count Count

The number of entries in the ResourceDictionary.

Item[String] Item[String]

Retrieves the Object value associated with the key index.

Keys Keys

The collection of identifier strings that are keys in the ResourceDictionary.

MergedDictionaries MergedDictionaries

Gets the collection of dicionaries that were merged into this dictionary.

MergedWith MergedWith

Gets or sets the type of object with which the resource dictionary is merged.

Source Source

Gets or sets the URI of the merged resource dictionary.

Values Values

Retrieves the values of the ResourceDictionary.


Add(ResourceDictionary) Add(ResourceDictionary)

Add mergedResourceDictionary to the merged dictionaries in this resource dictionary.

Add(Style) Add(Style)

Adds an implicit Style to the ResourceDictionary.

Add(StyleSheet) Add(StyleSheet)

Adds styleSheet tho this resource dictionary's list of style sheets.

Add(String, Object) Add(String, Object)

Adds key and value to the ResourceDictionary as a key-value pair.

Clear() Clear()

Empties the ResourceDictionary.

ContainsKey(String) ContainsKey(String)

Whether the ResourceDictionary contains a key-value pair identified by key.

GetEnumerator() GetEnumerator()

Returns a IEnumerator<T> of the ResourceDictionary's KeyValuePair<TKey,TValue>s.

Remove(String) Remove(String)

Removes the key and value identified by key from the ResourceDictionary.

SetAndLoadSource(Uri, String, Assembly, IXmlLineInfo) SetAndLoadSource(Uri, String, Assembly, IXmlLineInfo)

For internal use by the Xamarin.Forms platform.

TryGetValue(String, Object) TryGetValue(String, Object)

Retrieves the object specified by key or, if not present, the default value of null.

Explicit Interface Implementations

ICollection<KeyValuePair<String,Object>>.Add(KeyValuePair<String,Object>) ICollection<KeyValuePair<String,Object>>.Add(KeyValuePair<String,Object>)

Adds an item to the collection.

ICollection<KeyValuePair<String,Object>>.Contains(KeyValuePair<String,Object>) ICollection<KeyValuePair<String,Object>>.Contains(KeyValuePair<String,Object>)

Returns a value that indicates whether the dictionary contains the value in item, indexed by the key in item.

ICollection<KeyValuePair<String,Object>>.CopyTo(KeyValuePair<String,Object>[], Int32) ICollection<KeyValuePair<String,Object>>.CopyTo(KeyValuePair<String,Object>[], Int32)

For internal use by the Xamarin.Forms platform.

ICollection<KeyValuePair<String,Object>>.IsReadOnly ICollection<KeyValuePair<String,Object>>.IsReadOnly

Gets a value that indicates whether the resource dictionary is read-only.

ICollection<KeyValuePair<String,Object>>.Remove(KeyValuePair<String,Object>) ICollection<KeyValuePair<String,Object>>.Remove(KeyValuePair<String,Object>)

For internal use by the Xamarin.Forms platform.

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

For internal use by the Xamarin.Forms platform.

IResourceDictionary.ValuesChanged IResourceDictionary.ValuesChanged

For internal use by the Xamarin.Forms platform.

Applies to