XmlnsDictionary Class
TOC
Collapse the table of content
Expand the table of content

XmlnsDictionary Class

 

Represents a dictionary that contains xmlns mappings for XAML namespaces in WPF.

Namespace:   System.Windows.Markup
Assembly:  PresentationFramework (in PresentationFramework.dll)

System.Object
  System.Windows.Markup.XmlnsDictionary

public class XmlnsDictionary : IDictionary, ICollection, IEnumerable, 
	IXamlNamespaceResolver

NameDescription
System_CAPS_pubmethodXmlnsDictionary()

Initializes a new instance of the XmlnsDictionary class.

System_CAPS_pubmethodXmlnsDictionary(XmlnsDictionary)

Initializes a new instance of the XmlnsDictionary class by using the specified dictionary as a copy source.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of items in the XmlnsDictionary.

System_CAPS_pubpropertyIsFixedSize

Gets a value that indicates whether the size of the XmlnsDictionary is fixed.

System_CAPS_pubpropertyIsReadOnly

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

System_CAPS_pubpropertyIsSynchronized

Gets a value that indicates whether access to this XmlnsDictionary is thread safe.

System_CAPS_pubpropertyItem[Object]

Gets or sets the XAML namespace URI associated with the specified prefix.

System_CAPS_pubpropertyItem[String]

Gets or sets the XAML namespace URI associated with the specified prefix.

System_CAPS_pubpropertyKeys

Gets a collection of all the keys in the XmlnsDictionary.

System_CAPS_pubpropertySealed

Gets a value that indicates whether the XmlnsDictionary is sealed.

System_CAPS_pubpropertySyncRoot

Gets an object that can be used to synchronize access to the XmlnsDictionary.

System_CAPS_pubpropertyValues

Gets a collection of all the values in the XmlnsDictionary.

NameDescription
System_CAPS_pubmethodAdd(Object, Object)

Adds a prefix-URI pair to this XmlnsDictionary.

System_CAPS_pubmethodAdd(String, String)

Adds a prefix-URI pair to this XmlnsDictionary.

System_CAPS_pubmethodClear()

Removes all entries from this XmlnsDictionary.

System_CAPS_pubmethodContains(Object)

Returns a value that indicates whether the specified prefix key is in this XmlnsDictionary.

System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the entries in the XmlnsDictionary to the specified array.

System_CAPS_pubmethodCopyTo(DictionaryEntry[], Int32)

Copies the entries in the XmlnsDictionary to the specified DictionaryEntry array.

System_CAPS_pubmethodDefaultNamespace()

Looks up the XAML namespace that corresponds to the default XAML namespace.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetDictionaryEnumerator()

Returns a dictionary enumerator that iterates through this XmlnsDictionary.

System_CAPS_protmethodGetEnumerator()

Returns an enumerator that iterates through this XmlnsDictionary.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetNamespace(String)

Retrieves a XAML namespace for the provided prefix string.

System_CAPS_pubmethodGetNamespacePrefixes()

Returns all possible prefix-XAML namespace mappings (NamespaceDeclaration values) that are available in the active schema context.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodLookupNamespace(String)

Returns the XAML namespace URI that corresponds to the specified XML namespace prefix.

System_CAPS_pubmethodLookupPrefix(String)

Returns the prefix that corresponds to the specified XAML namespace URI.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodPopScope()

Pops the scope of the XmlnsDictionary.

System_CAPS_pubmethodPushScope()

Pushes the scope of the XmlnsDictionary.

System_CAPS_pubmethodRemove(Object)

Removes the item with the specified prefix key from the XmlnsDictionary.

System_CAPS_pubmethodRemove(String)

Removes the item with the specified prefix key from the XmlnsDictionary.

System_CAPS_pubmethodSeal()

Locks the dictionary so that it cannot be changed.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary.GetEnumerator()

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IDictionary.GetEnumerator.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

This API supports the product infrastructure and is not intended to be used directly from your code. For a description of this member, see IEnumerable.GetEnumerator.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

XmlnsDictionary maps XAML namespace prefixes to the complete XAML namespace URI. For XAML usage in applications and XAML namespaces in general, the URI is often not a schema-style URI that includes http://. It is instead a user-defined mapping to a CLR namespace and assembly. That assembly contains the backing types being referred to. For details, see XAML Namespaces and Namespace Mapping for WPF XAML.

The XmlnsDictionary adds the concept of scope for a XAML namespace. A default IDictionary might contain prefix keys and XML namespace URI values. The scope concept in XmlnsDictionary parallels the XML concept that a prefix might be redefined. 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). 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. However, XmlnsDictionary does expose PushScope and PopScope so that a custom ParserContext implementation that changes scope can synchronize with the scope for the XmlnsDictionary.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft