Επεξεργασία

Κοινή χρήση μέσω


XamlReader.Parse Method

Definition

Reads the markup in the specified text string and returns an object that corresponds to the root of the specified markup.

Overloads

Parse(String, ParserContext)

Reads the XAML markup in the specified text string (using a specified ParserContext) and returns an object that corresponds to the root of the specified markup.

Parse(String)

Reads the XAML input in the specified text string and returns an object that corresponds to the root of the specified markup.

Parse(String, Boolean)
Parse(String, ParserContext, Boolean)

Parse(String, ParserContext)

Reads the XAML markup in the specified text string (using a specified ParserContext) and returns an object that corresponds to the root of the specified markup.

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

Parameters

xamlText
String

The input XAML, as a single text string.

parserContext
ParserContext

Context information used by the parser.

Returns

The root of the created object tree.

Remarks

The implementation calls Load internally after creating a stream from the string. See Load for additional information such as possible exceptions.

Applies to

Parse(String)

Reads the XAML input in the specified text string and returns an object that corresponds to the root of the specified markup.

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

Parameters

xamlText
String

The input XAML, as a single text string.

Returns

The root of the created object tree.

Remarks

The implementation calls Load internally after creating a stream from the string. See Load for additional information such as possible exceptions.

Applies to

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

Parameters

xamlText
String
useRestrictiveXamlReader
Boolean

Returns

Applies to

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

Parameters

xamlText
String
parserContext
ParserContext
useRestrictiveXamlReader
Boolean

Returns

Applies to