LoadAsync Method (XmlReader)
Collapse the table of content
Expand the table of content

XamlReader.LoadAsync Method (XmlReader)

Reads the XAML markup in the specified XmlReader and returns the root of the corresponding object tree, asynchronously.

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

public Object LoadAsync (
	XmlReader reader
)
public Object LoadAsync (
	XmlReader reader
)
public function LoadAsync (
	reader : XmlReader
) : Object
You cannot use methods in XAML.

Parameters

reader

The XAML to load.

Return Value

The root of the deserialized tree.

Exception typeCondition

ArgumentNullException

reader is a null reference (Nothing in Visual Basic).

InvalidOperationException

multiple load operations are performed concurrently with the same XamlReader.

In order for LoadAsync to load the XAML asynchronously, the root element in the XAML markup must contain the attribute x:SynchronousMode="async".

Only one asynchronous load operation per instance of the XamlReader class can be performed at a time. If more than one asynchronous operation is attempted on the same instance of the XamlReader class an InvalidOperationException is thrown.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2016 Microsoft