Version

Load(Stream,CalendarInfoCategories) Method

Loads UltraCalendarInfo data from a stream.
Syntax
'Declaration
 
Public Overloads Sub Load( _
   ByVal stream As Stream, _
   ByVal categories As CalendarInfoCategories _
) 
public void Load( 
   Stream stream,
   CalendarInfoCategories 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 UltraCalendarInfo information.

Example
This example uses the Save and Load methods to save the state of one UltraCalendarInfo object and load it into another one.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.IO
Imports System.Globalization

    Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click

        '	Create a new memory stream
        Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream()

        '	Save the state of the UltraCalendarInfo object to the memory stream
        Me.ultraCalendarInfo1.Save(stream, CalendarInfoCategories.All)

        '	Create a new instance of the UltraCalendarInfo object
        Dim calendarInfo As UltraCalendarInfo = New UltraCalendarInfo()

        '	Reset the stream position before we load the data
        stream.Position = 0

        '	Load the state of the saved UltraCalendarInfo object to the new one
        calendarInfo.Load(stream, CalendarInfoCategories.All)

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

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

			//	Create a new memory stream
			System.IO.MemoryStream stream = new System.IO.MemoryStream();

			//	Save the state of the UltraCalendarInfo object to the memory stream
			this.ultraCalendarInfo1.Save( stream, CalendarInfoCategories.All );

			//	Create a new instance of the UltraCalendarInfo object
			UltraCalendarInfo calendarInfo = new UltraCalendarInfo();

			//	Reset the stream position before we load the data
			stream.Position = 0;

			//	Load the state of the saved UltraCalendarInfo object to the new one
			calendarInfo.Load( stream, CalendarInfoCategories.All );

		}
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