Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docking manager in TabControl can cause InvalidOperationException #159

Closed
drapka opened this issue May 7, 2020 · 1 comment
Closed

Docking manager in TabControl can cause InvalidOperationException #159

drapka opened this issue May 7, 2020 · 1 comment

Comments

@drapka
Copy link

drapka commented May 7, 2020

Hi,
I have a DockingManager component in a tabcontrol. Floating windows in this manager automatically appear after app start even when the tab with the docking manager is not yet selected, which is cool (Loaded event is called). But there is an issue if I try to drag the floating window before selecting the tab with the docking manager - an InvalidOperationException (This Visual is not connected to a PresentationSource) occurs:

This exception was originally thrown at this call stack:
    [External Code]
    AvalonDock.Controls.TransformExtensions.PointToScreenDPI(System.Windows.Media.Visual, System.Windows.Point) in TransformExtentions.cs
    AvalonDock.Controls.TransformExtensions.PointToScreenDPIWithoutFlowDirection(System.Windows.FrameworkElement, System.Windows.Point) in TransformExtentions.cs
    AvalonDock.DockingManager.AvalonDock.Controls.IOverlayWindowHost.HitTest(System.Windows.Point) in DockingManager.cs
    AvalonDock.Controls.DragService.UpdateMouseLocation.AnonymousMethod__0(AvalonDock.Controls.IOverlayWindowHost) in DragService.cs
    AvalonDock.Controls.DragService.UpdateMouseLocation(System.Windows.Point) in DragService.cs
    AvalonDock.Controls.DragService.Drop(System.Windows.Point, out bool) in DragService.cs
    AvalonDock.Controls.LayoutFloatingWindowControl.FilterMessage(System.IntPtr, int, System.IntPtr, System.IntPtr, ref bool) in LayoutFloatingWindowControl.cs
    AvalonDock.Controls.LayoutDocumentFloatingWindowControl.FilterMessage(System.IntPtr, int, System.IntPtr, System.IntPtr, ref bool) in LayoutDocumentFloatingWindowControl.cs
    [External Code]
    ...
Dirkster99 added a commit that referenced this issue May 8, 2020
@Dirkster99
Copy link
Owner

Hi Thanx for the feedback.

The issue is solved (in master branch) and will be part of the next release.

Cheers Drk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants