Version

LoadFromXml(Stream,CalendarLookCategories) Method

Loads UltraCalendarLook data from a stream.
Syntax
'Declaration
 
Public Overloads Sub LoadFromXml( _
   ByVal stream As Stream, _
   ByVal categories As CalendarLookCategories _
) 
public void LoadFromXml( 
   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 LoadFromXml method to load UltraCalendarLook data from a previously saved XML stream.

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

	Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click

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

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