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.WinForms
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.EndDate = DateTime.Today + TimeSpan.FromDays(100);
calendar.CurrentView = CalendarView.WeekRange;
calendar.WeekRangeSettings.ViewStyle = WeekRangeViewStyle.WeekPerRow;
calendar.WeekRangeSettings.GroupWeekends = State.Enabled;
calendar.EndInit();

Visual Basic  Copy Code

Imports MindFusion.Scheduling.WinForms

' ...

calendar.BeginInit()
calendar.Date = DateTime.Today
calendar.EndDate = DateTime.Today.Add(TimeSpan.FromDays(100))
calendar.CurrentView = CalendarView.WeekRange
calendar.WeekRangeSettings.ViewStyle = WeekRangeViewStyle.WeekPerRow
calendar.WeekRangeSettings.GroupWeekends = State.Enabled
calendar.EndInit()

 See Also