Version

Save(Stream,CalendarInfoCategories) Method

Saves CalendarInfo data to a stream.
Syntax
'Declaration
 
Public Overloads Sub Save( _
   ByVal stream As Stream, _
   ByVal categories As CalendarInfoCategories _
) 
public void Save( 
   Stream stream,
   CalendarInfoCategories categories
)

Parameters

stream
Stream object into which to serialize a copy of the UltraCalendarInfo 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 UltraCalendarInfo should start serializing its information.

When you pass CalendarInfoCategories.General, the following property settings are saved:

  • AllowAllDayEvents
  • AllowRecurringAppointments
  • AppointmentActionsEnabled
  • FirstDayOfWeek
  • LogicalDayDuration
  • LogicalDayOffset
  • MaxDate
  • MaxSelectedDays
  • MinDate
  • SelectTypeActivity
  • SelectTypeDay
  • Tag
  • WeekRule
  • ReminderImage

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