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

Using Arbitrary Types in XAML

Thanks to XAML’s general-purpose nature, you can use it with just about any .NET object, C++/CX objects in a C++ app targeting the Windows Runtime, or even COM objects in a WPF app, thanks to COM interoperability. This includes types you define yourself.

It doesn’t matter whether these objects have anything to do with a user interface. However, the objects need to be designed in a “declarative-friendly” way. For example, if a class doesn’t have a default constructor and doesn’t expose useful instance properties, it’s usually not going to be directly usable from XAML. A lot of care went into the design of the XAML-based frameworks—above and beyond the usual .NET or Windows Runtime design guidelines—in order to fit ...

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