Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

New Post: WPF version mouse down cannot fire if invalidatePlot in PlotModel.MouseMove

$
0
0
The following code will make PlotView's OnMouseDown cannot fire.

The reason could be the invalidate plot function makes PlotView too busy on drawing itself.

Result is:
Cannot make an annotation following mouse cursor and do the mouse down even at the same time.

Possible solution:
Use something like tracker, which doesn't call InvalidatePlot.
plotModel.MouseMove += (s, e) => {
    //lineAnnotation.X = lineAnnotation.InverseTransform(e.Position).X;
    plotModel.InvalidatePlot(false);
};
How to duplicate:
  1. Open WPF Example browser.
  2. Open "Clicking on an annotation"
  3. Add the top code to it.
  4. Monitor PlotView's OnMouseDown.

Viewing all articles
Browse latest Browse all 2061

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>