WPF-学习笔记 按下鼠标拖动窗口

private void grid_right_MouseDown(object sender, MouseButtonEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed)
{
DragMove();
}
}

如上一个事件所表现的,只需要在需要按下鼠标的控件事件里加入代码就可以实现。

原文地址:https://www.cnblogs.com/hayywcy/p/2291149.html