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

Custom MouseWheel action

1 Answer 96 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
anatoly
Top achievements
Rank 1
anatoly asked on 19 Nov 2010, 10:28 AM
Hello,

ASFIK there is no zoom shortcut in RadScheduleView. As slider seems to be not best solution, I'm trying to implement zoom on CTRL+MouseWheel. But RadScheduleView.MouseWheel event is never invoked.

I've done some research and found the following event handler in ScheduleViewBase

protected override void OnMouseWheel(MouseWheelEventArgs e)
{
    e.Handled = true;
    double newDelta = SystemParameters.WheelScrollLines * this.VerticalSmallChange;
    if (e.Delta > 0)
    {
        newDelta = -newDelta;
    }
    double offset = Math.Min(this.ExtentHeight, Math.Max((double) 0.0, (double) (this.VerticalOffset + newDelta)));
    this.VerticalOffset = offset;
    base.OnMouseWheel(e);
}

MouseWheel event is always handled by control itself.

Is it possible to expose it as done in RadScheduler?

Thanks,
Anatoly

1 Answer, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 23 Nov 2010, 09:19 AM
Hello anatoly,

You can use PreviewMouseWheel and handle it so that ScheduleView will not scroll vertically.

Let us know if you need more information.

Regards,
Hristo
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
ScheduleView
Asked by
anatoly
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or