LoadWithInitialTemplateValidation method
Collapse the table of content
Expand the table of content

XamlReader.LoadWithInitialTemplateValidation method

Parses a well-formed XAML fragment creates a corresponding object tree, and returns the root of the object tree. Also performs load-time validation of any linked templates.

Syntax


public static object LoadWithInitialTemplateValidation(
  string xaml
)

Parameters

xaml

Type: System.String [.NET] | Platform::String [C++]

A string that contains a valid XAML fragment.

Return value

Type: System.Object [.NET] | Platform::Object [C++]

The root object of the created object tree.

Remarks

Usage for LoadWithInitialTemplateValidation is generally the same as for XamlReader.Load. For more info, see "Remarks" section of XamlReader.Load. Most apps won't need the template validation feature; that aspect is more intended for design tools that are actively changing and reloading XAML, and perhaps enabling real-time XAML template editing.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Markup
Windows::UI::Xaml::Markup [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Markup
Windows::UI::Xaml::Markup [C++]

Metadata

Windows.winmd

See also

XamlReader
XamlReader.Load
XAML syntax guide
XAML overview

 

 

Show:
© 2016 Microsoft