O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

XamlServices

To minimize the amount of code you need to write, the most common uses for XAML readers and writers are packaged in a set of easy-to-use static methods in a class called System.Xaml.XamlServices. It has the following methods:

Image Load—Depending on the overload, you can give it a filename string, a Stream, a TextReader, an XmlReader, or a XamlReader, and it returns the root of the corresponding live object graph, like the older XamlReader.Load API. Internally, Load uses XamlXmlReader and XamlObjectWriter to do its work, as in Listing 21.1.

Parse—Like Load, Parse returns the root of a live object graph, but it accepts XAML content as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required