Version

Load(Stream,CalendarLookCategories) Method

Loads UltraCalendarLook data from a stream.
Syntax
'Declaration
 
Public Overloads Sub Load( _
   ByVal stream As Stream, _
   ByVal categories As CalendarLookCategories _
) 
public void Load( 
   Stream stream,
   CalendarLookCategories categories
)

Parameters

stream
Stream object containing a serialized copy of the UltraCalendarLook information.
categories
Enumeration of categories to deserialize.
Remarks

Since the stream could contain other information, the stream should be positioned to the start of the UltraCalendarLook information.

Example
The following example demonstrates how to call UltraCalendarLook's Load method to load UltraCalendarLook data from a previously saved binary stream.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

	Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click

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

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

		private void button8_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.ultraCalendarLook1.Load(stream, CalendarLookCategories.All);
					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