XmlnsDictionary.DefaultNamespace 方法

定义

查找与默认 XAML 命名空间对应的 XAML 命名空间。Looks up the XAML namespace that corresponds to the default XAML namespace.

public:
 System::String ^ DefaultNamespace();
public string DefaultNamespace ();
member this.DefaultNamespace : unit -> string
Public Function DefaultNamespace () As String

返回

如果存在与默认 XML 命名空间对应的命名空间,则为该命名空间;否则为 nullThe namespace that corresponds to the default XML namespace if one exists; otherwise, null.

注解

从映射角度来看,默认的 XML 命名空间是映射到空字符串的 XML 命名空间。From a mapping perspective, the default XML namespace is the XML namespace that is mapped to empty string. 在用于应用程序的 WPF XAML 分析中,操作的默认命名http://schemas.microsoft.com/winfx/2006/xaml/presentation空间标识符为,但此 API 未显式返回该值。In WPF XAML parsing for application purposes, the acting default namespace identifier is http://schemas.microsoft.com/winfx/2006/xaml/presentation, but that value is not explicitly returned by this API.

适用于