ResourceDictionary 類別

定義

將識別碼字串對應至任意資源物件的 IDictionary。

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>>
繼承
System.Object
ResourceDictionary
實作
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

建構函式

ResourceDictionary()

建立新的空白 ResourceDictionary 物件。

屬性

Count

ResourceDictionary 中的項目數。

Item[String]

擷取與索引鍵 index 建立關聯的 System.Object 值。

Keys

ResourceDictionary 中為索引鍵的識別碼 string 集合。

MergedDictionaries

取得合併到這個字典的字典集合。

MergedWith
已淘汰.

取得或設定用來合併資源字典的物件類型。

Source

取得或設定已合併資源字典的 URI。

Values

擷取 ResourceDictionary 的值。

方法

Add(ResourceDictionary)

mergedResourceDictionary 新增至 this 資源字典中的合併字典。

Add(String, Object)

keyvalue 以索引鍵/值組新增至 ResourceDictionary

Add(Style)

將隱含樣式新增至 ResourceDictionary。

Add(StyleSheet)

styleSheet 新增至 this 資源字典的樣式表清單。

Clear()

清空 ResourceDictionary

ContainsKey(String)

ResourceDictionary 是否包含 key 所識別的索引鍵/值組。

GetEnumerator()

傳回 ResourceDictionarySystem.Collections.Generic.KeyValuePair`2System.Collections.Generic.IEnumerator`1

Remove(String)

ResourceDictionary 移除由 key 所識別的索引鍵和值。

SetAndLoadSource(Uri, String, Assembly, IXmlLineInfo)

供 Xamarin.Forms 平台內部使用。

TryGetValue(String, Object)

將識別碼字串對應至任意資源物件的 IDictionary。

明確介面實作

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

將項目新增至集合。

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

傳回值,指出字典是否包含 item 中的值,且是以 item 中的索引鍵來檢索。

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

供 Xamarin.Forms 平台內部使用。

ICollection<KeyValuePair<String,Object>>.IsReadOnly

取得值,這個值表示資源字典是否為唯讀。

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

供 Xamarin.Forms 平台內部使用。

IEnumerable.GetEnumerator()

供 Xamarin.Forms 平台內部使用。

IResourceDictionary.ValuesChanged

將識別碼字串對應至任意資源物件的 IDictionary。

擴充方法

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

供 Xamarin.Forms 平台內部使用。

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

供 Xamarin.Forms 平台內部使用。

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

供 Xamarin.Forms 平台內部使用。

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

供 Xamarin.Forms 平台內部使用。

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

供 Xamarin.Forms 平台內部使用。

適用於