Example #1
0
 public static void Save(XamlDomObject rootObjectNode, string fileName)
 {
     var schemaContext = rootObjectNode.Type.SchemaContext;
     var dr = new XamlDomReader(rootObjectNode, schemaContext);
     var xws = new XmlWriterSettings();
     xws.Indent = true;
     using (var xw = XmlWriter.Create(fileName, xws))
     {
         var xxw = new XamlXmlWriter(xw, schemaContext);
         XamlServices.Transform(dr, xxw);
     }
 }
        public static void Save(XamlDomObject rootObjectNode, string fileName)
        {
            var schemaContext = rootObjectNode.Type.SchemaContext;
            var dr            = new XamlDomReader(rootObjectNode, schemaContext);
            var xws           = new XmlWriterSettings();

            xws.Indent = true;
            using (var xw = XmlWriter.Create(fileName, xws))
            {
                var xxw = new XamlXmlWriter(xw, schemaContext);
                XamlServices.Transform(dr, xxw);
            }
        }