XmlnsDictionary XmlnsDictionary XmlnsDictionary XmlnsDictionary Class

定義

表示包含 wpf 的 XAML 命名空間的 xmlns 對應的字典。Represents a dictionary that contains xmlns mappings for XAML namespaces in WPF.

public ref class XmlnsDictionary : System::Collections::IDictionary, System::Xaml::IXamlNamespaceResolver
public class XmlnsDictionary : System.Collections.IDictionary, System.Xaml.IXamlNamespaceResolver
type XmlnsDictionary = class
    interface IDictionary
    interface ICollection
    interface IEnumerable
    interface IXamlNamespaceResolver
Public Class XmlnsDictionary
Implements IDictionary, IXamlNamespaceResolver
繼承
XmlnsDictionaryXmlnsDictionaryXmlnsDictionaryXmlnsDictionary
實作

備註

XmlnsDictionary 將 XAML 命名空間前置詞對應至完整的 XAML 命名空間 URI。XmlnsDictionary maps XAML namespace prefixes to the complete XAML namespace URI. XAML 應用程式中的使用方式和一般的 XAML 命名空間,URI 通常不是結構描述樣式的 URI,其中包含http://For XAML usage in applications and XAML namespaces in general, the URI is often not a schema-style URI that includes http://. 它是改為使用者定義對應到 CLR 命名空間和組件。It is instead a user-defined mapping to a CLR namespace and assembly. 組件包含支援型別所參考。That assembly contains the backing types being referred to. 如需詳細資訊,請參閱 < XAML 命名空間和命名空間對應 WPF XAMLFor details, see XAML Namespaces and Namespace Mapping for WPF XAML.

XmlnsDictionary加入 XAML 命名空間範圍的概念。The XmlnsDictionary adds the concept of scope for a XAML namespace. 預設值IDictionary可能包含前置詞的索引鍵和 XML 命名空間 URI 值。A default IDictionary might contain prefix keys and XML namespace URI values. 中的範圍概念XmlnsDictionary平行 XML 概念可能會重新定義前置詞。The scope concept in XmlnsDictionary parallels the XML concept that a prefix might be redefined. 如果是的話,重新定義僅適用於該層級或以下版本 (先前的定義適用於在 DOM 中的高層級) 的 xml DOM 檢視中。If so, the redefinition only applies at that level or below in a DOM view of the XML (the previous definition applies at higher level in the DOM). 中大部分抽範圍概念離XmlnsDictionaryAPI,例如,您可以呼叫 Api 例如LookupNamespace而不用擔心範圍。The scope concept is mostly abstracted away in the XmlnsDictionary API, such that you can call APIs such as LookupNamespace without being concerned about scope. 不過,XmlnsDictionary會公開PushScopePopScope讓自訂ParserContext變更範圍的實作可以同步處理的範圍與XmlnsDictionaryHowever, XmlnsDictionary does expose PushScope and PopScope so that a custom ParserContext implementation that changes scope can synchronize with the scope for the XmlnsDictionary.

建構函式

XmlnsDictionary() XmlnsDictionary() XmlnsDictionary() XmlnsDictionary()

初始化 XmlnsDictionary 類別的新執行個體。Initializes a new instance of the XmlnsDictionary class.

XmlnsDictionary(XmlnsDictionary) XmlnsDictionary(XmlnsDictionary) XmlnsDictionary(XmlnsDictionary) XmlnsDictionary(XmlnsDictionary)

初始化的新執行個體XmlnsDictionary類別做為複製來源使用指定的字典。Initializes a new instance of the XmlnsDictionary class by using the specified dictionary as a copy source.

屬性

Count Count Count Count

取得 XmlnsDictionary 中的項目數。Gets the number of items in the XmlnsDictionary.

IsFixedSize IsFixedSize IsFixedSize IsFixedSize

取得值,指出是否大小XmlnsDictionary固定的。Gets a value that indicates whether the size of the XmlnsDictionary is fixed.

IsReadOnly IsReadOnly IsReadOnly IsReadOnly

取得值,這個值表示 XmlnsDictionary 是否為唯讀。Gets a value that indicates whether the XmlnsDictionary is read-only.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

取得值,指出是否會存取這個XmlnsDictionary為安全執行緒。Gets a value that indicates whether access to this XmlnsDictionary is thread safe.

Item[Object] Item[Object] Item[Object] Item[Object]

取得或設定與指定的前置詞的 URI 相關聯的 XAML 命名空間。Gets or sets the XAML namespace URI associated with the specified prefix.

Item[String] Item[String] Item[String] Item[String]

取得或設定與指定的前置詞的 URI 相關聯的 XAML 命名空間。Gets or sets the XAML namespace URI associated with the specified prefix.

Keys Keys Keys Keys

取得集合中的所有索引鍵的XmlnsDictionaryGets a collection of all the keys in the XmlnsDictionary.

Sealed Sealed Sealed Sealed

取得值,指出是否XmlnsDictionary密封格式。Gets a value that indicates whether the XmlnsDictionary is sealed.

SyncRoot SyncRoot SyncRoot SyncRoot

取得可用以同步存取 XmlnsDictionary 的物件。Gets an object that can be used to synchronize access to the XmlnsDictionary.

Values Values Values Values

取得集合中的所有值的XmlnsDictionaryGets a collection of all the values in the XmlnsDictionary.

方法

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

將前置 URI 組加入至這個XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

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

將前置 URI 組加入至這個XmlnsDictionaryAdds a prefix-URI pair to this XmlnsDictionary.

Clear() Clear() Clear() Clear()

移除所有項目從這個XmlnsDictionaryRemoves all entries from this XmlnsDictionary.

Contains(Object) Contains(Object) Contains(Object) Contains(Object)

傳回值,這個值,指出指定的前置索引鍵是否在這個XmlnsDictionaryReturns a value that indicates whether the specified prefix key is in this XmlnsDictionary.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

中的項目複製XmlnsDictionary到指定的陣列。Copies the entries in the XmlnsDictionary to the specified array.

CopyTo(DictionaryEntry[], Int32) CopyTo(DictionaryEntry[], Int32) CopyTo(DictionaryEntry[], Int32) CopyTo(DictionaryEntry[], Int32)

中的項目複製XmlnsDictionary指定DictionaryEntry陣列。Copies the entries in the XmlnsDictionary to the specified DictionaryEntry array.

DefaultNamespace() DefaultNamespace() DefaultNamespace() DefaultNamespace()

查閱對應至預設 XAML 命名空間的 XAML 命名空間。Looks up the XAML namespace that corresponds to the default XAML namespace.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetDictionaryEnumerator() GetDictionaryEnumerator() GetDictionaryEnumerator() GetDictionaryEnumerator()

傳回逐一查看此字典列舉程式XmlnsDictionaryReturns a dictionary enumerator that iterates through this XmlnsDictionary.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

傳回列舉值逐一查看此XmlnsDictionaryReturns an enumerator that iterates through this XmlnsDictionary.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetNamespace(String) GetNamespace(String) GetNamespace(String) GetNamespace(String)

擷取 XAML 命名空間提供的前置詞字串。Retrieves a XAML namespace for the provided prefix string.

GetNamespacePrefixes() GetNamespacePrefixes() GetNamespacePrefixes() GetNamespacePrefixes()

傳回所有可能的前置詞-XAML 命名空間對應 (NamespaceDeclaration值),可用於作用中的結構描述內容。Returns all possible prefix-XAML namespace mappings (NamespaceDeclaration values) that are available in the active schema context.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
LookupNamespace(String) LookupNamespace(String) LookupNamespace(String) LookupNamespace(String)

傳回指定的 XML 命名空間前置詞的 XAML 命名空間對應的 URI。Returns the XAML namespace URI that corresponds to the specified XML namespace prefix.

LookupPrefix(String) LookupPrefix(String) LookupPrefix(String) LookupPrefix(String)

傳回指定的 XAML 命名空間 URI 對應的前置詞。Returns the prefix that corresponds to the specified XAML namespace URI.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
PopScope() PopScope() PopScope() PopScope()

取出的範圍XmlnsDictionaryPops the scope of the XmlnsDictionary.

PushScope() PushScope() PushScope() PushScope()

推送的範圍XmlnsDictionaryPushes the scope of the XmlnsDictionary.

Remove(Object) Remove(Object) Remove(Object) Remove(Object)

移除具有從指定的前置索引鍵的項目XmlnsDictionaryRemoves the item with the specified prefix key from the XmlnsDictionary.

Remove(String) Remove(String) Remove(String) Remove(String)

移除具有從指定的前置索引鍵的項目XmlnsDictionaryRemoves the item with the specified prefix key from the XmlnsDictionary.

Seal() Seal() Seal() Seal()

鎖定字典,讓它無法進行變更。Locks the dictionary so that it cannot be changed.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

明確介面實作

IDictionary.GetEnumerator() IDictionary.GetEnumerator() IDictionary.GetEnumerator() IDictionary.GetEnumerator()

如需這個成員的說明,請參閱 GetEnumerator()For a description of this member, see GetEnumerator().

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

如需這個成員的說明,請參閱 GetEnumerator()For a description of this member, see GetEnumerator().

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

將轉換IEnumerableIQueryableConverts an IEnumerable to an IQueryable.

適用於

另請參閱