Problem of AutoHide DockablePane when using Remote Desktop Connection

Aug 9, 2011 at 6:16 AM
Edited Aug 9, 2011 at 10:40 AM

We find out a problem of AutoHide DockablePane  when using Remote Desktop Connection (mstsc.exe).

Take Sample2 in Source Code as an example, here's description to the problem,

[Steps]
1) Start Remote Desktop Connection to connect to another window system;
2) Run Sample2_35 in remote window system;
3) Toggle the AutoHide of Log Pane to set it AutoHide;
4) Click Log Pane to activate it;
5) Drag the title of MainWindow to move it;

[Pre-condition]
Below setting must be unchecked in remote system,
Control Panel --> System --> Advanced --> Performance --> Settings --> Visual Effects --> Custom --> Show window contents while dragging.

[Actual Result]
The Log Pane is shown like a floating window, in its old location.

[Expected Result]
The Log Pane should follow the MainWindow to its new location.

The problem only exists when using Remote Desktop Connection. When we run it in local system, everything works well.
I don't know whether it is a problem of Remote Desktop Connection or AvalonDock. 

Is there anybody could give me any clue for fixing it? Thanks a lot!

Aug 9, 2011 at 10:47 AM
Edited Aug 9, 2011 at 10:50 AM

I do following modification can fix this problem.

Add below code to method DockingManager_Loaded( ), file DockingManager.cs

Window parentWindow = Window.GetWindow(this);
If (parentWindow != null)
parentWindow.LocationChanged += (source, data) => UpdateFlyoutWindowPosition();

I think it is just a trick. Anyway, it works.