代码如下:
订阅需要拖拽的地方的MouseLeftButtonDown事件,判断当前鼠标状态再执行拖拽

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

相关文章:

  • 2022-12-23
  • 2021-07-11
  • 2021-08-05
  • 2021-06-17
  • 2022-01-22
  • 2021-05-28
  • 2022-12-23
  • 2021-12-28
猜你喜欢
  • 2021-06-18
  • 2021-11-17
  • 2021-10-02
  • 2022-12-23
  • 2021-12-12
相关资源
相似解决方案