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

Oystein Bjorke 10 лет назад 0
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.
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.

Сервис поддержки клиентов работает на платформе UserEcho