本文长期更新...
1. 鼠标按下拖拽窗体
自定义窗体的界面,右键按下鼠标后,可移动窗体的代码
注册 MouseLeftButtonDown 事件
/// <summary> /// 鼠标左键点击可移动窗体 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (e.ButtonState == MouseButtonState.Pressed) { DragMove(); } }
标签:鼠标,上位,按下,窗体,机软件,WPF,MouseLeftButtonDown From: https://www.cnblogs.com/bruceleeliya/p/17745949.html