Invalid window handle
System.ComponentModel.Win32Exception: Invalid window handle
at MS.Win32.UnsafeNativeMethods.ClientToScreen(HandleRef hWnd, POINT pt)
at MS.Internal.PointUtil.ClientToScreen(Point pointClient, PresentationSource presentationSource)
at System.Windows.Input.MouseDevice.GlobalHitTest(Point ptClient, PresentationSource inputSource, IInputElement& enabledHit, IInputElement& originalHit)
at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.MouseDevice.Synchronize()
at System.Windows.Input.MouseDevice.OnHitTestInvalidatedAsync(Object sender, EventArgs e)
at System.Windows.Input.InputManager.HitTestInvalidatedAsyncCallback(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
Exception data:
System.Object:
at MS.Win32.UnsafeNativeMethods.ClientToScreen(HandleRef hWnd, POINT pt)
at MS.Internal.PointUtil.ClientToScreen(Point pointClient, PresentationSource presentationSource)
at System.Windows.Input.MouseDevice.GlobalHitTest(Point ptClient, PresentationSource inputSource, IInputElement& enabledHit, IInputElement& originalHit)
at System.Windows.Input.MouseDevice.PreNotifyInput(Object sender, NotifyInputEventArgs e)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.MouseDevice.Synchronize()
at System.Windows.Input.MouseDevice.OnHitTestInvalidatedAsync(Object sender, EventArgs e)
at System.Windows.Input.InputManager.HitTestInvalidatedAsyncCallback(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)