mirror of
https://github.com/xenia-project/dockpanelsuite.git
synced 2026-01-31 01:25:23 +01:00
Merge pull request #215 from fschick/master
DockPanel.Persistor / SaveAsXml: Use XmlWriter.Create
This commit is contained in:
@@ -232,10 +232,8 @@ namespace WeifenLuo.WinFormsUI.Docking
|
||||
|
||||
public static void SaveAsXml(DockPanel dockPanel, Stream stream, Encoding encoding, bool upstream)
|
||||
{
|
||||
XmlTextWriter xmlOut = new XmlTextWriter(stream, encoding);
|
||||
|
||||
// Use indenting for readability
|
||||
xmlOut.Formatting = Formatting.Indented;
|
||||
// Use indenting for readability
|
||||
XmlWriter xmlOut = XmlWriter.Create(stream, new XmlWriterSettings() { Encoding = encoding, Indent = true });
|
||||
|
||||
if (!upstream)
|
||||
xmlOut.WriteStartDocument();
|
||||
|
||||
Reference in New Issue
Block a user