Version

LoadFromXml(Stream) Method

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

Parameters

stream
The stream from which to load the data.
Example
The following code shows how to load a toolbar layout from an XML stream.

Imports System.Diagnostics
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
Imports System.Runtime.Serialization.Formatters.Soap
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars

	Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click

		Try
			Dim Stream As New FileStream("C:\\Layout.xml", FileMode.Open)
			If Not Stream Is Nothing Then
				Stream.Seek(0, SeekOrigin.Begin)
				Me.UltraToolbarsManager1.LoadFromXml(Stream)
				Stream.Close()
			End If
		Catch
			Debug.WriteLine("Error encountered while loading stream!")
		End Try

	End Sub
using System.Diagnostics;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization.Formatters.Soap;
using Infragistics.Win;
using Infragistics.Win.UltraWinToolbars;

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

			try
			{
				FileStream stream = new FileStream("C:\\Layout.xml", FileMode.Open);
				if (stream != null)
				{
					stream.Seek(0, SeekOrigin.Begin); 
					this.ultraToolbarsManager1.LoadFromXml(stream);
					stream.Close();
				}
			}
			catch
			{
				Debug.WriteLine("Error encountered while loading 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