Version

LoadFromBinary(Stream) Method

Loads UltraListView 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
A Stream containing saved layout data.
Remarks

This method loads the data emitted by the SaveAsBinary(Stream) method.

Example
The following code sample demonstrates how to use the UltraListView's SaveAsXml, SaveAsBinary, LoadFromXml, and LoadFromBinary methods to persist the state of the control when a Form closes and restore it when the Form is loaded:

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinListView

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.ultraListView1.Reset();

        If System.IO.File.Exists("UltraListView.xml") Then
            Me.ultraListView1.LoadFromXml("UltraListView.xml")
        Else
            Me.ultraListView1.LoadFromBinary("UltraListView.bin")
        End If
	 End Sub


    Private Sub Form1_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
        If saveAsXml Then
            Me.ultraListView1.SaveAsXml("UltraListView.xml")
        Else
            Me.ultraListView1.SaveAsBinary("UltraListView.bin")
        End If
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinListView;
using System.Diagnostics;
using System.IO;

		private void Form1_Load(object sender, System.EventArgs e)
		{
			this.ultraListView1.Reset();

			if ( File.Exists("UltraListView.xml") )
				this.ultraListView1.LoadFromXml( "UltraListView.xml" );
			else
			if ( File.Exists("UltraListView.bin") )
				this.ultraListView1.LoadFromBinary( "UltraListView.bin" );

		}


		private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if ( this.saveAsXml )
				this.ultraListView1.SaveAsXml( "UltraListView.xml" );
			else
				this.ultraListView1.SaveAsBinary( "UltraListView.bin" );
		}
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