WPF.双击事件
WPF双击事件 别走弯路-CSDN论坛.html(https://bbs.csdn.net/topics/392493855?list=2474794)
private void MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { switch (e.ClickCount) { case 1://单击 { NativeMethods.SendMessage(Hwnd, (int)WindowMessages.WM_NCLBUTTONDOWN, (IntPtr)HitTest.HTCAPTION, IntPtr.Zero); break; } case 2://双击 { WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; break; } }