# Working with Views

The scheduler displays dates and times using a "view" that can be [Day](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/day-view), [MultiDay](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/multiday-view), [Week](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/week-view),  [Work Week](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/work-week-view), [Month](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/month-view) and [Timeline](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/timeline-view).

> note The difference between a day view and a multi-day view is that while the day view is constrained to showing a single sequence of consecutive days (for example 7th through 10th, or 10th through 12th, or just the 15th), the multi-day view can display all of the above sequences at once.

At any one time the scheduler displays a view using a descendant of the **SchedulerView** class: **SchedulerDayView, SchedulerWeekView, SchedulerMonthView** and **SchedulerTimelineView**. Each view has special properties particular to the view. Use the RadScheduler **GetDayView()**, **GetWeekView(),**  **GetMonthView()** and **GetTimelineView()** methods to get the respective views. Here's an example that retrieves the day view and sets the ruler to start at the second hour and stop at the fifth hour:

#### Get Day View

```C#
SchedulerDayView dayView = radScheduler1.GetDayView();
dayView.RulerStartScale = 2;
dayView.RulerEndScale = 5;

```

```VB.NET
Dim dayView As SchedulerDayView = RadScheduler1.GetDayView()
dayView.RulerStartScale = 2
dayView.RulerEndScale = 5
```

After running the code, the day view for the scheduler looks like this screenshot:

> caption Figure 1: Day View

![WinForms RadScheduler Day View](https://www.telerik.com/products/winforms/documentation/assets/f2db60fadcdec029263682fac938269b/scheduler-views-working-with-views001.png)

Change between views by changing the **ActiveViewType** property to one of the **SchedulerViewType** enumeration members.

#### ActiveViewType Property

```C#
radScheduler1.ActiveViewType = SchedulerViewType.Day;

```

```VB.NET
RadScheduler1.ActiveViewType = SchedulerViewType.Day
```

Retrieve the view that is currently being displayed by using the ActiveView property, cast it to be the ActiveViewType.

#### ActiveView Property

```C#
radScheduler1.ActiveViewType = SchedulerViewType.Month;
(radScheduler1.ActiveView as SchedulerMonthView).WeekCount = 2;

```

```VB.NET
RadScheduler1.ActiveViewType = SchedulerViewType.Month
TryCast(RadScheduler1.ActiveView, SchedulerMonthView).WeekCount = 2
```

> caption Figure 2: Week Count

![WinForms RadScheduler Week Count](https://www.telerik.com/products/winforms/documentation/assets/49672bdc685c3f520196af3a2d23310a/scheduler-views-working-with-views002.png)

Detect changes to the view by handling the **ActiveViewChanging** and **ActiveViewChanged** events. As always, the "Changing" event arguments provide the ability to cancel the view change, but also the "old" and "new" views before and after the view changes transpires:

```C#
void radScheduler1_ActiveViewChanging(object sender, SchedulerViewChangingEventArgs e)
{
    this.Text = String.Format("Old: {0} New: {1}",
    e.OldView.ViewType.ToString(), e.NewView.ViewType.ToString());
}

```

```VB.NET
Private Sub radScheduler1_ActiveViewChanging(ByVal sender As Object, ByVal e As SchedulerViewChangingEventArgs)
    Me.Text = String.Format("Old: {0} New: {1}", e.OldView.ViewType.ToString(), e.NewView.ViewType.ToString())
End Sub
```

## See Also

* [Common Visual Properties](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/common-visual-properties)
* [Views Walkthrough](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/views-walkthrough)
* [Grouping by Resources](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/grouping-by-resources)
* [Exact Time Rendering](https://www.telerik.com/products/winforms/documentation/controls/scheduler/views/exact-time-rendering)
