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

Scrolling with rad diagram

1 Answer 119 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Atul
Top achievements
Rank 1
Atul asked on 26 Sep 2013, 11:53 AM
Hello Team,
           i have problem  with  rad diagram, in my case ,when i am trying to mouse wheel in rad diagram, its get zoomed-in or zoomed-out
now please suggest me, i want when user try scrolling in mouse wheel,only vertical scroll bar should be scroll instead of zoom-in  or zoomed-out.

Thanks in advance....

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 01 Oct 2013, 07:45 AM
Hello Atul,

In order to achieve your requirement you need to restrict the Zooming feature, first. You can do this by subscribing to the PreviewZoom event of the RadDiagram and mark it as handled. Another way to do this is to set IsZoomEnabled property of the RadDiagram to False.

Furthermore, you can subscribe to the MouseWheel event of the RadDiagram and manually scroll the diagram. You can do this with the following snippet:

private void xDiagram_MouseWheel(object sender, MouseWheelEventArgs e)
{
    var diagram = sender as RadDiagram;
    diagram.Scroll(0, e.Delta);
}
 
private void xDiagram_PreviewZoom(object sender, Telerik.Windows.Controls.Diagrams.DiagramZoomEventArgs e)
{
    e.Handled = true;
}
I hope that this clarifies your concerns.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Diagram
Asked by
Atul
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or