$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Scheduler control for Windows Forms
Create rich Outlook style functionality and add rich scheduling interfaces to C# Windows application
Home > WinForms UI Controls > User Manual > Scheduler Time Zone Views in C#

C# Setting Time Zone in KetticSchedulers

The SchedulerView class of the control supports the Time Zones functionality. The time zone feature presents an hour scale for the users to customize the time zone. Furthermore, it is able to display different time rulers to present different time zones at a time. Kettic SchedulerView class provides the SystemTimeZone and DefaultTimeZone properties for the users to customize the time zones functionality for your C# Windows Forms applications.

C# Class for Customizing the Time Zones in Scheduler

KetticScheduler WinForms control adds all the time zones properties into the SchedulerTimeZone C# class, of which the TimeZoneInformation object include all the time zone information and the Label displays the time zone titles in a day view. To easily take the entire time zones from the Windows, we can call the static GetTimeZones method to return a TimeZoneCollection object with the entire TimeZoneInformation objects. Moreover, we can call the GetSchedulerTimeZones method to get the complete SchedulerTimeZone objects in SchedulerTimeZone C# class.

SystemTimeZone property for Changing Time Zone in Scheduler

KetticScheduler control allows the developers to change the time zone representation of appointments through the SystemTimeZone property. The appointments of KetticScheduler control will be changed based on the value of the SystemTimeZone property, which is the local time zone of the computer by default. The following C# code sample demonstrates how to create an appointment in Scheduler and then set the SystemTimeZone property to a specific time zone.

this.ketticScheduler1.Appointments.Add(new Appointment(DateTime.Now.Date.AddHours(1), new TimeSpan(1, 0, 0)));

SchedulerTimeZone pstTimeZone = new SchedulerTimeZone(0, "PST");
this.ketticScheduler1.SystemTimeZone = pstTimeZone;

DefaultTimeZone property for Customizing Time Zone in Scheduler

This DefaultTimeZone property is included in each of the KetticScheduler Views. The current view of the Scheduler control will stand for the entire appointment elements in the default time zone based on the SystemTimeZone. The following C# code creates an appointment that will be displayed from 3pm to 5pm by default.

this.ketticScheduler1.Appointments.Add(new Appointment(DateTime.Now.Date.AddHours(2), new TimeSpan(2, 0, 0)));
After that, we shall change the DefaultTimeZone property of the ActiveDayView to the new time zone, PST+ 2, with the C# code below. And the representation of the appointment will be changed based on the client computer.

SchedulerTimeZone pstPlusOneTimeZone = new SchedulerTimeZone(-120, "PST + 2");
this.ketticScheduler1.GetDayView().DefaultTimeZone = pstPlusOneTimeZone;

C# Applying SystemTimeZone and DefaultTimeZone together

KetticScheduler View class provides the TimeZones property for each view of Day, Week, and Work Week. When we define the DefaultTimeZone property, the new setting will be the default time zone and create rulers for each time zone in the TimeZones collection. In the real world, the client computers of your application may be in different time zones. To solve this issue, we should select a time zone as the system time zone for all the client stations, for example, when we create an appointment beginning at 3pm, it will starts at 3pm in a specific time zone. The KetticScheduler provides the SystemTimeZone property to set the system time zone. The following C# code sample shows how to achieve this.
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