$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Calendar Controls for WinForms UI Tutorial
Important Events in C# for Calendar Controls for Windows Forms applications
Home > WinForms UI Controls > User Manual > Calendar Events in C#

Events - Calendar Controls for Windows Forms

The Windows Forms Calendar control provides many cool features, like months preview, multi-month view, date zooming, multi-day selection, globalization support as well as data binding. The skin of the calendar control is changeable, which allows developers change the themes available in the WinForms UI control suite or the themes from other sources.

The complete features support by the WinForms Calendar Control:

Events of Calendar control in C# WinForms

  • ElementRender, the event handler will use an argument which is the type of RenderElementEventArgs that contain data about this event. There are three properties provide information to control this event.
  • Day, a RenderElementEventArgs property, adds a reference to the Calendar Day logical object of WinForms Calendar control, which contains the specified day to render.
  • Element, a RenderElementEventArgs property, adds a reference to the Light Visual Element object of WinForms Calendar control, which visually stands for the specified day to render.
  • View, a RenderElementEventArgs property, adds a reference to the Calendar View object currently displayed by WinForms Calendar control, which contains the specified day to render.
  • SelectionChanging, this is an event that will be triggered just before a change of selection. It also allows users to cancel the change. The SelectionEventArgs will a Date, or a DateCollection of selected dates to the SelectionChanging event. It is also possible to cancel the changes by setting the value of Cancel to true.
  • SelectionChanged, this is an event that will be triggered while a day, week, month or year is changed. The following is the C# Code to trigger this event.

void calendar1_SelectionChanged(object sender, EventArgs e)
{
listControl1.Items.Add(new listDataItem(calendar1.SelectedDate.ToShortDateString().ToString()));
}
  • ViewChanging, this is an event that will be triggered just before ViewChanged. Users can also cancel the changes. The ViewChangingEventArgs will pass View and a boolean Cancel property to this ViewChanging event.
  • ViewChanged, this is an event that will be triggered when the currently visible view is changed, for example, when changing the view of a Year or Months.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls