Share via


ResourceDictionary Class

Definition

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>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<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>>
Inheritance
System.Object
ResourceDictionary
Implements
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>> System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>> System.Collections.Generic.IDictionary<System.String,System.Object> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String,System.Object>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<TKey,TValue>> System.Collections.Generic.IEnumerable<T> System.Collections.IEnumerable IResourceDictionary

Constructors

ResourceDictionary()

Creates a new empty ResourceDictionary object.

Properties

Count

The number of entries in the ResourceDictionary.

Item[String]

Retrieves the System.Object value associated with the key index.

Keys

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

MergedDictionaries

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

MergedWith
Obsolete.

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

Source

Gets or sets the URI of the merged resource dictionary.

Values

Retrieves the values of the ResourceDictionary.

Methods

Add(ResourceDictionary)

Add mergedResourceDictionary to the merged dictionaries in this resource dictionary.

Add(String, Object)

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

Add(Style)

Adds an implicit Style to the ResourceDictionary.

Add(StyleSheet)

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

Clear()

Empties the ResourceDictionary.

ContainsKey(String)

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

GetEnumerator()

Returns a System.Collections.Generic.IEnumerator`1 of the ResourceDictionary's System.Collections.Generic.KeyValuePair`2s.

Remove(String)

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

SetAndLoadSource(Uri, String, Assembly, IXmlLineInfo)

For internal use by the Xamarin.Forms platform.

TryGetValue(String, Object)

Explicit Interface Implementations

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

Adds an item to the collection.

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)

For internal use by the Xamarin.Forms platform.

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>)

For internal use by the Xamarin.Forms platform.

IEnumerable.GetEnumerator()

For internal use by the Xamarin.Forms platform.

IResourceDictionary.ValuesChanged

Extension Methods

ForEach<T>(IEnumerable<T>, Action<T>)

For internal use by the Xamarin.Forms platform.

GroupToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

For internal use by the Xamarin.Forms platform.

IndexOf<T>(IEnumerable<T>, T)

For internal use by the Xamarin.Forms platform.

IndexOf<T>(IEnumerable<T>, Func<T,Boolean>)

For internal use by the Xamarin.Forms platform.

Prepend<T>(IEnumerable<T>, T)

For internal use by the Xamarin.Forms platform.

Applies to