Escape to cancel toolwindow drag can result in DisconnectedContext error

Docking/MDI for WPF Forum

Posted 7 years ago by Chien A.
Version: 17.2.0660
Platform: .NET 4.7
Environment: Windows 10 (64-bit)
Avatar

As per title, can get a "DisconnectedContext" error/exception during toolwindow left-click drag operations, if escape key is pressed to cancel the move.

e.g.

1) While dragging a tabbed toolwindow out to become a floating window

2) While dragging a floating toolwindow over other toolwindows/docksite/whatever such that docking overlays are visible

And probably more cases...

Couple things to note:

Drag operations do seem to end up cancelled afterwards, even after the error. Also after the exception occurs, internally something seems to be in a kind of error state, and can get further exceptions after a while even without any interaction.

Comments (1)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

All we are doing in that scenario is closing a WPF Window.  It seems that this managed debugging assistant notification (that doesn't really seem to be an exception and can be skipped over) only occurs if your VS debugging settings have "Enable UI Debugging Tools for XAML" checked.  Here is a StackOverflow article with some more info:

https://stackoverflow.com/questions/42766603/disconnectedcontext-exception-on-closing-a-window

We did discover a bug introduced in the 2017.2 version's improvements for floating windows though.  In the first 2017.2 build that came out the other day, if you press Esc while dragging, the dragged windows are attempting to restore to their old locations.  But this is effectively moving them back into the dragged dock host, which is the bug since we now allow restoring to floating windows.  We fixed this for the next build (hopefully in a week or so) that will restore them better to their previous locations instead of hiding them (the bug).


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.