Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library
Microsoft Public License
1.39k stars 318 forks source link

This Visual is not connected to a PresentationSource while undocking #442

Open B4c0nStr1ps opened 1 year ago

B4c0nStr1ps commented 1 year ago

Hello, I keep getting a "This Visual is not connected to a PresentationSource" exception while undocking a panel from an app that is positioned in between two monitor with different scale factor and resolution. I don't have a deterministic way of reproducing the issue. To reproduce it I have usually to position the app in between the two monitor and then try to un-dock - move dock several time. Sometimes it begins to have the anchor panel ui placed in some weird position on a different monitor then the issue starts. The app was originally stuck at version 3.6 but also upgrading to the latest the issue persist. .net version is 4.6.2 and happens on both Window 10 and 11.

at System.Windows.Media.Visual.PointToScreen(Point point) at AvalonDock.Controls.LayoutFloatingWindowControl.OnActivated(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Windows.Window.OnActivated(EventArgs e) at System.Windows.Window.WmActivate(IntPtr wParam) at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)