void Write(Drawing drawing, XmlWriter writer) { var figures = drawing.GetSerializableFigures(); writer.WriteStartDocument(); writer.WriteStartElement("Drawing"); writer.WriteAttributeDouble("Version", drawing.Version); writer.WriteAttributeString("Creator", System.Windows.Application.Current.ToString()); WriteCoordinateSystem(drawing, writer); WriteStyles(drawing, writer); WriteFigureList(figures, writer); writer.WriteEndElement(); writer.WriteEndDocument(); }