$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 Timeline Views in C#

C# Customize Timeline View with KetticScheduler in Windows Forms

KetticScheduler control is capable of Timeline View, which shows the appointments in time slots in horizontal direction. With the Timeline view support, the users are able to customize the time slots according to the duration and change the time scale from minutes to years. Furthermore, the timeline view allows the developers to create, add, and customize the appointments at runtime in C# Windows project, as well as select, resize, drag and drop, navigate with keyboard, and group cells in appointments. When adding the Navigator control to the Scheduler, we can view the preview month and the coming day through the back and forward keyboard arrows.

Timeline View Structure of KetticScheduler

The structure of Timeline View is different from that of Day, MultipleDay, Week and WorkWeek views. The TimeLine view only has a Header and Columns or Scales for the hour, day, week, and month and Appointment Cells. We can choose a predefined value to the scales or select a new scale in the time table for the TimeLine view. Additionally, the Scheduler allows the users to choose their preference from the context menu to set the scales.

C# Set Timeline View in KetticScheduler

To change the default view to be the Timeline view in Scheduler, we shall set the ActiveView type to Timeline. The C# code as below demonstrate the modification

this.ketticScheduler1.ActiveViewType = Kettic.WinForms.UI.SchedulerViewType.Timeline;

C# Get Timeline View in Scheduler for .NET application

When we customize the Timeline view in KetticScheduler, we shall use the GetTimelineView method to get the instance to the SchedulerTimeling view. The C# code below shows the implementation

SchedulerTimelineView timelineView = this.ketticScheduler1.GetTimelineView();
An alternative approach is to set the ActiveView property to get the Timeline view in Scheduler for .NET Windows application.

this.ketticScheduler1.ActiveViewType = Kettic.WinForms.UI.SchedulerViewType.Timeline;

Change Time Range and Set First Date in C#.NET

The SchedulerView C# class contains the StartDateRange and EndDateRange properties for the users to customize the range of Timeline view. After we set the range to the Timeline view, we cannot navigate beyond the range.
In addition, the SchedulerView class provides the StartDate property for the users to set the first date that will be displayed in the timeline view. The first date must be between the dates of StartDateRange and EndDateRange. The C# code below demonstrates how to set these properties.

this.ketticScheduler1.GetTimelineView().StartDateRange = new DateTime(2012, 8, 15);
this.ketticScheduler1.GetTimelineView().EndDateRange = new DateTime(2012, 12, 15);
this.ketticScheduler1.GetTimelineView().StartDate = new DateTime(2012, 10, 20);
The following C# code shows how to get the duration between StartDateRange and EndDateRange

TimeSpan duration = timelineView.Duration;

Customize Time Scale of Timeline in Scheduler

The Timeline view contains several predefined values, including 15 minutes, Hour, Day, Week, Month, and Year. The users can easily select one of the predefined values or right click in the time table to choose the preferable setting from the context menu to set a new time scale. The following C# code demonstrates how to set the time scale by using the DisplayTimescale method.

Timescales scale = Timescales.Hours;
timelineView.DisplayTimescale(scale);
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