XamlReader.Parse 方法  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
读取指定文本字符串中的标记,并返回与指定标记的根对应的对象。
重载
| Parse(String, ParserContext) | 
						 (使用指定的 ParserContext)读取指定文本字符串中的 XAML 标记,并返回与指定标记的根对应的对象。  | 
        	
| Parse(String) | 
						 读取指定文本字符串中的 XAML 输入,并返回与指定标记的根对应的对象。  | 
        	
| Parse(String, Boolean) | |
| Parse(String, ParserContext, Boolean) | 
Parse(String, ParserContext)
(使用指定的 ParserContext)读取指定文本字符串中的 XAML 标记,并返回与指定标记的根对应的对象。
public:
 static System::Object ^ Parse(System::String ^ xamlText, System::Windows::Markup::ParserContext ^ parserContext);
	public static object Parse (string xamlText, System.Windows.Markup.ParserContext parserContext);
	static member Parse : string * System.Windows.Markup.ParserContext -> obj
	Public Shared Function Parse (xamlText As String, parserContext As ParserContext) As Object
	参数
- xamlText
 - String
 
输入 XAML,作为单个文本字符串。
- parserContext
 - ParserContext
 
由分析器使用的上下文信息。
返回
已创建的对象树的根。
注解
实现在从字符串创建流后在内部调用 Load 。 有关其他信息,例如可能的异常,请参阅 Load 。
适用于
Parse(String)
读取指定文本字符串中的 XAML 输入,并返回与指定标记的根对应的对象。
public:
 static System::Object ^ Parse(System::String ^ xamlText);
	public static object Parse (string xamlText);
	static member Parse : string -> obj
	Public Shared Function Parse (xamlText As String) As Object
	参数
- xamlText
 - String
 
输入 XAML,作为单个文本字符串。
返回
已创建的对象树的根。
注解
实现在从字符串创建流后在内部调用 Load 。 有关其他信息,例如可能的异常,请参阅 Load 。
适用于
Parse(String, Boolean)
public:
 static System::Object ^ Parse(System::String ^ xamlText, bool useRestrictiveXamlReader);
	public static object Parse (string xamlText, bool useRestrictiveXamlReader);
	static member Parse : string * bool -> obj
	Public Shared Function Parse (xamlText As String, useRestrictiveXamlReader As Boolean) As Object
	参数
- xamlText
 - String
 
- useRestrictiveXamlReader
 - Boolean
 
返回
适用于
Parse(String, ParserContext, Boolean)
public:
 static System::Object ^ Parse(System::String ^ xamlText, System::Windows::Markup::ParserContext ^ parserContext, bool useRestrictiveXamlReader);
	public static object Parse (string xamlText, System.Windows.Markup.ParserContext parserContext, bool useRestrictiveXamlReader);
	static member Parse : string * System.Windows.Markup.ParserContext * bool -> obj
	Public Shared Function Parse (xamlText As String, parserContext As ParserContext, useRestrictiveXamlReader As Boolean) As Object
	参数
- xamlText
 - String
 
- parserContext
 - ParserContext
 
- useRestrictiveXamlReader
 - Boolean