2010-04-14 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 14 Apr 2010 10:23:06 +0000 (10:23 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Wed, 14 Apr 2010 10:23:06 +0000 (10:23 -0000)
* XamlServices.cs : fix Transform implementation.

svn path=/trunk/mcs/; revision=155374

mcs/class/System.Xaml/System.Xaml/ChangeLog
mcs/class/System.Xaml/System.Xaml/XamlServices.cs

index 8f88c6bbb61deb361c9bd2a7c8a78d865a786876..629cd2372ba3ff11b1edf5890c079736f40efc40 100644 (file)
@@ -1,3 +1,7 @@
+2010-04-14  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * XamlServices.cs : fix Transform implementation.
+
 2010-04-14  Atsushi Enomoto  <atsushi@ximian.com>
 
        * XamlServices.cs : added a couple of missing methods.
index a93bd5b53b9c2ba702cadd20d3ab49a75cc2c5af..b70f876cc05b0d4445707ba48dcb5674fec05743 100644 (file)
@@ -73,7 +73,7 @@ namespace System.Xaml
 
                public static void Save (string fileName, object instance)
                {
-                       using (var xw = XmlWriter.Create (fileName))
+                       using (var xw = XmlWriter.Create (fileName, new XmlWriterSettings () { OmitXmlDeclaration = true }))
                                Save (xw, instance);
                }
 
@@ -115,8 +115,12 @@ namespace System.Xaml
                        if (xamlReader.NodeType == XamlNodeType.None)
                                xamlReader.Read ();
 
-                       xamlWriter.WriteNode (xamlReader);
-
+                       while (!xamlReader.IsEof) {
+                               xamlWriter.WriteNode (xamlReader);
+                               xamlReader.Read ();
+                       }
+                       if (closeWriter)
+                               xamlWriter.Close ();
                }
        }
 }