简体   繁体   中英

Zoom In/Out chart control DevExpress

I have a chart control inside a grid where there is a scrollviewer. A client need is to activate zoom on the chart control but when i use the mouse wheel on the chart control, except when i reach the limit on the grid scrollviewer, it's the grid scrollviewer who is scrolling.

I think there is a miss inside the devexpress control because on the native wpf control it's work. Exemple list view.

Do you already have this issue? Do you find the solution?

    ChartControl cc = new ChartControl();

cc.Titles.Add(new DevExpress.Xpf.Charts.Title() { Content = "" });
cc.Legend = new DevExpress.Xpf.Charts.Legend();

DevExpress.Xpf.Charts.XYDiagram2D xy = new DevExpress.Xpf.Charts.XYDiagram2D();
xy.EnableAxisXNavigation = true;
xy.EnableAxisYNavigation = true;

To resolve this issue, implement custom mouse wheel processing by handling the ScrollViewer.PreviewMouseWheel event. Check this ticket for a sample project illustrating this approach (see the DXSample.zip archive).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM