WPF version mouse down cannot fire if invalidatePlot in PlotModel.MouseMove
This discussion was imported from CodePlex
sharethl wrote at 2014-08-07 16:41:
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.
How to duplicate:
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); };
- Open WPF Example browser.
- Open "Clicking on an annotation"
- Add the top code to it.
- Monitor PlotView's OnMouseDown.
Customer support service by UserEcho