Version

LoadFromBinary(Stream) Method

Loads the docked window information from the specified stream containing a serialized UltraDockManager using the SaveAsBinary(Stream) method.
Syntax
'Declaration
 
Public Overloads Sub LoadFromBinary( _
   ByVal stream As Stream _
) 
public void LoadFromBinary( 
   Stream stream
)

Parameters

stream
Stream from which to load the information
Example
The following example shows how to load a binary UltraDockManager layout from a file stream.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinDock
Imports System.IO

Private Sub btnLoadLayoutBinary_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadLayoutBinary.Click

    Dim stream As FileStream = Nothing
    Dim fileName As String = Application.CommonAppDataPath & "\dockManager.bin"

    If Not File.Exists(fileName) Then Exit Sub

    Try
        stream = New FileStream(fileName, FileMode.Open, FileAccess.Read)

        Me.ultraDockManager1.LoadFromBinary(stream)
    Finally
        If Not stream Is Nothing Then stream.Close()
    End Try

End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinDock;
using System.Diagnostics;
using System.IO;

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

	FileStream stream = null;
	string fileName = Application.CommonAppDataPath + @"\dockManager.bin";

	if (!File.Exists(fileName))
		return;

	try
	{
		stream = new FileStream(fileName, FileMode.Open, FileAccess.Read);

		this.ultraDockManager1.LoadFromBinary(stream);
	}
	finally
	{
		if (stream != null)
			stream.Close();
	}

}
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