Using XXRS and XXR with XR…a how to.
Mike Shim blogged how you should Use XamlReader.Load for WPF XAML (not XamlServices.Load).
I just saw a twitter comment asking how to XamlXmlReaderSettings with XamlReader.
I believe we ended up enabling in .NET 4, the ability to use System.Xaml.dll with WPF with a few special exposed APIs:
//If you want to set any special settings (like local assembly, you can set those settings here)
XamlXmlReaderSettings xxrs = new XamlXmlReaderSettings() { };
//The WPF Schema Context is optimized for perf.
XamlXmlReader xxr = new XamlXmlReader(@"c:\temp\rtf.xaml", System.Windows.Markup.XamlReader.GetWpfSchemaContext(), xxrs);
//Calling this API will ensure that any special operations for WPF are done on this XAML node stream.
object root = System.Windows.Markup.XamlReader.Load(xxr);
Believe that will work…my memory and quick test says that it does work. Please comment if I am mistaken.