Version

SaveAsXml(Stream) Method

Loads UltraExplorerBar data from the specified stream previously saved in XML (Soap) format.
Syntax
'Declaration
 
Public Overloads Sub SaveAsXml( _
   ByVal stream As Stream _
) 
public void SaveAsXml( 
   Stream stream
)

Parameters

stream
A Stream to save the data to.
Remarks

This method saves the data which can be loaded by the LoadFromXml(Stream) method.

Example
The following code show how to save the control's state to a stream in XML format.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


	Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button22.Click

		Try
			Dim stream As New FileStream("C:\\Layout.xml", FileMode.OpenOrCreate)

			stream.Seek(0, SeekOrigin.Begin)

			Try
				Me.ultraExplorerBar1.SaveAsXml(stream)
			Catch
				MessageBox.Show(Me, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
			End Try

			stream.Close()
		Catch
			Debug.WriteLine("Error encountered while saving stream!")
		End Try

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;

		private void button22_Click(object sender, System.EventArgs e)
		{

			try
			{
				FileStream stream = new FileStream("C:\\Layout.xml", FileMode.OpenOrCreate);
				stream.Seek(0, SeekOrigin.Begin);

				try
				{
					this.ultraExplorerBar1.SaveAsXml(stream);
				}
				catch
				{
					MessageBox.Show(this, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}

				stream.Close();
			}
			catch
			{
				Debug.WriteLine("Error encountered while saving stream!");
			}
		}
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