This is a migrated thread and some comments may be shown as answers.

ScrollToVerticalOffset for RadScheduleView

1 Answer 87 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex Silva
Top achievements
Rank 1
Alex Silva asked on 14 Aug 2012, 06:48 PM
Is there a ScrollToVerticalOffset method or workaround for achieving the same effect for the RadScheduleView.  If not, are there any plans to implement one?

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 17 Aug 2012, 07:57 AM
Hi Alex,

You can use the FirstVisibleTime property of RadScheduleView to achieve the wanted behavior, you will also need to handle the VisibleRangeChanged event because the FirstVisibleTime property is only applied for the first visible view and after changing the view the default FirstVisibleTime is used.

You can set up the wanted behavior like this:

In the XAML:
<telerik:RadScheduleView x:Name="theScheduleView"
                            FirstVisibleTime="08:00"
                            VisibleRangeChanged="theScheduleView_VisibleRangeChanged">
    ...
</telerik:RadScheduleView>

and in the code behind:
private void theScheduleView_VisibleRangeChanged(object sender, EventArgs e)
{
    Dispatcher.BeginInvoke(new Action(() => { this.theScheduleView.ScrollTimeRuler(new TimeSpan(8, 0, 0), true, true); }));
}

Note that there is a known issue with this approach when changing from MonthView to the other views and it will be fixed in future releases.

Hope this helps.

Greetings,
Vladi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Alex Silva
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or