Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Parse Method (String, ParserContext)
Collapse the table of content
Expand the table of content

XamlReader.Parse Method (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.

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

public static Object Parse(
	string xamlText,
	ParserContext parserContext
)

Parameters

xamlText
Type: System.String

The input XAML, as a single text string.

parserContext
Type: System.Windows.Markup.ParserContext

Context information used by the parser.

Return Value

Type: System.Object
The root of the created object tree.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1, 3.0 SP2

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft