Version

LoadFromBinary(Stream) Method

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

Parameters

stream
Example
The following code shows how to load a toolbar layout from a binary 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 Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click

		Try
			Dim Stream As New FileStream("C:\\Layout.bin", FileMode.Open)
			If Not (Stream Is Nothing) Then
				Stream.Seek(0, SeekOrigin.Begin)
				Me.UltraToolbarsManager1.LoadFromBinary(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 button11_Click(object sender, System.EventArgs e)
		{

			try
			{
				FileStream stream = new FileStream("C:\\Layout.bin", FileMode.Open);
				if (stream != null)
				{
					stream.Seek(0, SeekOrigin.Begin); 
					this.ultraToolbarsManager1.LoadFromBinary(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