Version

SaveAsXml(Stream,CalendarLookCategories) Method

Saves the UltraCalendarLook data into a stream.
Syntax
'Declaration
 
Public Overloads Sub SaveAsXml( _
   ByVal stream As Stream, _
   ByVal categories As CalendarLookCategories _
) 
public void SaveAsXml( 
   Stream stream,
   CalendarLookCategories categories
)

Parameters

stream
Stream object into which to serialize a copy of the UltraCalendarLook information.
categories
Enumeration of categories to serialize.
Remarks

Since the stream could contain other information, the stream should be positioned to the location where the UltraCalendarLook should start serializing its information.

  • ActiveDayAppearance
  • AllDayEventAppearance
  • AlternateMonthAppearance
  • AlternateMonthDayAppearance
  • AlternateMonthDayHeaderAppearance
  • AppointmentAppearance
  • DayAppearance
  • DayHeaderAppearance
  • DayOfWeekHeaderAppearance
  • DayWithActivityAppearance
  • HolidayAppearance
  • MonthAppearance
  • MonthDayAppearance
  • MonthHeaderAppearance
  • NoteAppearance
  • OwnerHeaderAppearance
  • ScrollBarLook
  • SelectedAppointmentAppearance
  • SelectedDayAppearance
  • SelectedHolidayAppearance
  • SelectedNoteAppearance
  • Tag
  • TodayAppearance
  • TodayHeaderAppearance
  • TrailingDayAppearance
  • WeekAppearance
  • WeekHeaderAppearance

Example
The following example demonstrates how to call UltraCalendarLook's SaveAsXml method to save UltraCalendarLook data to an XML stream.

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

	Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click

		Try
			Dim stream As New FileStream("C:\\Layout.xml", FileMode.OpenOrCreate)
			stream.Seek(0, SeekOrigin.Begin)

			Try
				Me.UltraCalendarLook1.SaveAsXml(stream, CalendarLookCategories.All)
			Catch
				MessageBox.Show(Me, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
			End Try

			stream.Close()
		Catch
			Debug.WriteLine("Error encountered while saving stream!")
		End Try

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

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

			try
			{
				FileStream stream = new FileStream("C:\\Layout.xml", FileMode.OpenOrCreate);
				stream.Seek(0, SeekOrigin.Begin);

				try
				{
					this.ultraCalendarLook1.SaveAsXml(stream, CalendarLookCategories.All);
				}
				catch
				{
					MessageBox.Show(this, "Error encountered while saving to stream!", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}

				stream.Close();
			}
			catch
			{
				Debug.WriteLine("Error encountered while saving 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