Search
Calendar.BeginInit Method
See Also
 






Implements the ISupportInitialize.BeginInit method. Call this method before making several consecutive changes to the control to suppress internal updates, but don't forget to invoke EndInit at the end.

Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling

 Syntax

C#  Copy Code

public void BeginInit ()

Visual Basic  Copy Code

Public Sub BeginInit ()

 Example

The following example demonstrates how to use BeginInit and EndInit to prevent unnecessary updating.

C#  Copy Code

using MindFusion.Scheduling.WinForms;

// ...

calendar.BeginInit();
calendar.Date = DateTime.Today;
calendar.CurrentView = CalendarView.Timetable;
calendar.TimetableSettings.Dates.Clear();
calendar.TimetableSettings.Dates.Add(DateTime.Today);
calendar.TimetableSettings.Dates.Add(DateTime.Today.AddDays(1));
calendar.EndInit();

Visual Basic  Copy Code

Imports MindFusion.Scheduling.WinForms

' ...

calendar.BeginInit()
calendar.Date = DateTime.Today
calendar.CurrentView = CalendarView.Timetable
calendar.TimetableSettings.Dates.Clear()
calendar.TimetableSettings.Dates.Add(DateTime.Today)
calendar.TimetableSettings.Dates.Add(DateTime.Today.AddDays(1))
calendar.EndInit()

 See Also