ResourceDictionary 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
ResourceDictionaryResourceDictionary
Implements

Constructors

ResourceDictionary() ResourceDictionary()

Creates a new empty ResourceDictionary object.

Properties

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.

Methods

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 System.Collections.Generic.KeyValuePair`1s.

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.

Extension Methods

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

For internal use by the Xamarin.Forms platform.

GetGesturesFor<T>(IEnumerable<IGestureRecognizer>, Func<T,Boolean>) GetGesturesFor<T>(IEnumerable<IGestureRecognizer>, Func<T,Boolean>)

For internal use by the Xamarin.Forms platform.

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

For internal use by the Xamarin.Forms platform.

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

For internal use by the Xamarin.Forms platform.

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

For internal use by the Xamarin.Forms platform.

LoadFromXaml<TXaml>(TXaml, String) LoadFromXaml<TXaml>(TXaml, String)

Returns an initialized view by loading the specified xaml.

LoadFromXaml<TXaml>(TXaml, Type) LoadFromXaml<TXaml>(TXaml, Type)

Returns a TXaml with the properties that are defined in the application manifest for callingType.

Applies to