Version

Scroll the Current Day into View

This topic applies to the following WinSchedule™ controls:

  • WinMonthViewSingle™

  • WinWeekView™

The following code demonstrates how to scroll a day into view for the WinMonthViewSingle and WinWeekView elements utilizing the ScrollDayIntoView method.

In Visual Basic:

Private Sub Scroll_the_Current_Day_into_View_Load(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyBase.Load
        Me.UltraMonthViewSingle1.ScrollDayIntoView(DateTime.Today)
        Me.UltraWeekView1.ScrollDayIntoView(DateTime.Today)
End Sub

In C#:

private void Scroll_the_Current_Day_into_View_Load(object sender, EventArgs e)
{
        this.ultraMonthViewSingle1.ScrollDayIntoView(DateTime.Today);
        this.ultraWeekView1.ScrollDayIntoView(DateTime.Today);
}