I have a lower WPF main window in the window, I'm trying to create it so that the end user can drag the window.
I've added the window constructor to:
this.MouseLeftButtonDown + = Representative {Drammove (); }; The problem is, I have a dialog box that opens with two buttons. When I click on one of these buttons, I did not stand with the message "Unknown Operation Expression", "Only the primary mouse button can call the dramevou".
It presents some questions: Why would a mosuardone event in a dialogue have anything to do with this? How can I do without this exception?
Thank you!
The following code shows how to run a borderless window to return HTCAPTN to 'True' WM_NCHITTEST message That's how to do it. Note that if you have cursor on some specific visual elements in your window, then you want to return HTC LIENT, so this code is for you to get started.
Public partial squares window 1: window {public window 1 () {initial group (); } Secure Override Zero Onsource Initial (EventArgs e) {HwndSource hwndSource = (HwndSource) HwndSource.FromVisual (this); HwndSource.AddHook (WndProcHook); Base.OnSourceInitialized (E); } Private Static Input WndProcHook (IntPtr hwnd, Int msg, IntPtr wParam, IntPtr lParam, Riff bool handeled) {if (msg == 0x0084) // WM_NCHITTEST {handeled = true; Return (int.T) 2; // HTCAPTION} Return IntPtr.Zero; }}
Comments
Post a Comment