public static object Load(XmlReader xmlReader) { using (var reader = new XamlXmlReader(xmlReader, context)) { return Load(reader); } }
public static object Load(Stream stream) { using (var reader = new XamlXmlReader(stream, context)) { return Load(reader); } }
public static object Load(string path) { using (var reader = new XamlXmlReader(path, context)) { return Load(reader); } }
private static object Load(XamlXmlReader reader) { var writerSettings = new XamlObjectWriterSettings(); using (var writer = new XamlObjectWriter(context, writerSettings)) { XamlServices.Transform(reader, writer); return writer.Result; } }