WPF 踩坑笔记6 无边框窗体拖拽

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

  

<Window  WindowStyle="None" MouseDown="ContentControl_MouseDown">

 

上一篇:WPF 创建无边框的圆角窗体


下一篇:用消息实现窗体的 MouseDown 事件