日期:2014-05-17 浏览次数:21106 次
/// <summary>
/// 记录开始拖动时的坐标
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void treeview_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
_lastMouseDown = e.GetPosition(treeview);
}
private void treeview_MouseMove(object sender, MouseEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
Point currentPosition = e.GetPosition(treeview); //实时坐标
if ((Math.Abs(currentPosition.X - _lastMouseDown.X) > 2.0)
------解决方案--------------------