{
The switch (e.c. with our fabrication: lickCount)
{
Case 1://click
{
NativeMethods. SendMessage (Hwnd, (int) WindowMessages WM_NCLBUTTONDOWN, (IntPtr) HitTest. HTCAPTION, IntPtr. Zero).
break;
}
Case 2://double-click
{
WindowState=WindowState==WindowState. Maximized? WindowState. Normal: WindowState. Maximized;
break;
}
}
}
CodePudding user response:
Lz, sharing, learning, although didn't do any WPFCodePudding user response:
You this is drag form any part of the mobile forms of code, do you want to doCodePudding user response:
What detours this isCodePudding user response:
CodePudding user response:
Double-click the triggers before click, double-click the events triggered by MouseDoubleClick or PreviewMouseDoubleClick,CodePudding user response:
Log in CSDN, specially came to give you some praiseCodePudding user response:
Didn't quite understand the original poster to express the content of the general controls provide, DoubleClick events can not provide custom rules by clicking on the event, click twice time interval, the distance to simulate the effect of the double click event, such asCodePudding user response:
The original and the operation? The original directly determine the lickCount of e.c. with our fabrication: ok...Before in order to achieve the textblock simulation double-click events, events with the commonly used the online judge interval method,
According to the method of the building Lord, I direct the if (e.c. with our fabrication: lickCount==2) {MessageBox. Show (" double-click event has achieved!" )} is finished!
I am very terrible ignorance...
CodePudding user response:
Use clickcount==2 judgment or will conflict you do WPF or experience too little