Writing to Live Objects

The XAMLPAD sample doesn’t convert XAML to live objects as-is; it makes a few modifications to the XAML content to ensure that a wider range of WPF XAML can be rendered successfully. Specifically, it makes two modifications to the content:

Image It removes all event members, because unless the handler can be located, XamlObjectWriter would fail with an exception. Note that XamlObjectWriter has a RootObjectInstance property that could be set to an object with appropriate event handlers, but stripping out the events is the easiest approach, and usually just fine for a XAML experimentation tool.

It converts any Window element ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.