Version

SaveLayout(Object,XmlTextWriter) Method

Saves chart properties in xml format.
Syntax
'Declaration
 
Public Overloads Sub SaveLayout( _
   ByVal component As Object, _
   ByVal xmlW As XmlTextWriter _
) 
public void SaveLayout( 
   object component,
   XmlTextWriter xmlW
)

Parameters

component
This component
xmlW
Xml writer to save layout to.
Example
' SaveLayout and LoadLayout can be done through a file path...
Me.UltraChart1.SaveLayout(Me.ultraChart1, Application.StartupPath & "\myChartLayout.xml")
Me.UltraChart2.LoadLayout(Me.ultraChart2, Application.StartupPath & "\myChartLayout.xml")
			
' or through XmlTextWriter/XmlTextReader objects
Dim xTW As New System.Xml.XmlTextWriter(Application.StartupPath & "\myChartLayout.xml", System.Text.Encoding.Default)
this.ultraChart1.SaveLayout(Me.ultraChart1, xTW)
xTW.Close()
Dim xTR As New System.Xml.XmlTextReader(Application.StartupPath & "\myChartLayout.xml")
Me.ultraChart2.LoadLayout(Me.ultraChart2, xTR)
// SaveLayout and LoadLayout can be done through a file path...
this.ultraChart1.SaveLayout(this.ultraChart1, Application.StartupPath + @"\myChartLayout.xml");
this.ultraChart2.LoadLayout(this.ultraChart2, Application.StartupPath + @"\myChartLayout.xml");
			
// or through XmlTextWriter/XmlTextReader objects
System.Xml.XmlTextWriter xTW = new System.Xml.XmlTextWriter(Application.StartupPath + @"\myChartLayout.xml", System.Text.Encoding.Default);
this.ultraChart1.SaveLayout(this.ultraChart1, xTW);
xTW.Close();
System.Xml.XmlTextReader xTR = new System.Xml.XmlTextReader(Application.StartupPath + @"\myChartLayout.xml");
this.ultraChart2.LoadLayout(this.ultraChart2, xTR);
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also