WPF自定义窗体拖动
构造函数中添加如下代码:
this.Topmost = true;//顶层显示,看个人需要添加。 this.Loaded += (r, s) => { this.MouseDown += (x, y) => { if (y.LeftButton == MouseButtonState.Pressed) { this.DragMove(); } }; };