【发布时间】:2013-05-01 16:02:12
【问题描述】:
我有一个带有各种元素的 Canvas 控件,在这个特定的功能中,我允许用户在画布周围拖动一条线的终点。在 MouseMove 函数中,我调用了e.GetPosition()。
根据 VS 性能分析器,该函数在不断移动时接近应用程序总 CPU 的 30%。它很慢。我可以做些什么来提高这种性能?
CurrentPoint = e.GetPosition(PointsCanvas);
【问题讨论】:
-
in this particular function I am allowing a user to drag the end point of a line around the canvas- 我宁愿为此使用Thumb并处理DragDelta事件。 -
@HighCore 你能解释一下你的意思吗?谢谢