Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Mouse scroll zooming chart does not work inside a ScrollViewer
posted

Hi,

I have a XamDataChart inside a MainWindow scroll Viewer and the scrollViewer implements below to scroll the contents with Mouse Scroll.

private void OnPreviewMouseWheel (object sender, MouseWheelEventArgs e)
{
ScrollViewer scrollView = (ScrollViewer) sender;
scrollView.ScrollToVerticalOffset (scrollView.VerticalOffset - e.Delta);
e.Handled = true;
}

The issue is when cursor comes on XamDataChart while Mouse Scroll, I want chart should zoom in/zoom out as it works on Mouse scroll but this is not happening.

When I remove the above code, I can see chartzoom in/zoom out on Mouse scroll, but window contents are not scrolling.

I have set HorizontalZoomable and VerticalZoomable for chart to true.

Any comments?

Thanks,

Preeti

Parents Reply Children
No Data