Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
975
XamDockManager: Re-activating a pane that was previously closed while minimized
posted

Hello,

I am having an issue with the xamDockManager.  I attached a simple example application that demonstrates the issue.  Review my code to see what's going on and follow these instructions to reproduce:

1) Launch the app, it is just a window containing a button, a checkbox, and the XamDockManager. The button will show a screen in a floating window using the dock manager, and the checkbox controls whether the app attempts to restore minimized panes.

2) First leave the checkbox unchecked.

3) Click the button to show a screen. A floating window with appear with content. 

4) Resize/move around the floating window and then minimize the window. 

5) Once minimized, hover over the window in the Windows task pane, and click the X button to close the window.  

6) Click the show screen button again. The app will recycle existing panes, so the screen will now open in a minimized state.

7) Manually restore the window and it retains the initial size and location of the pane.  This works well.

8) Now, in our application we wish to automatically restore minimized windows when the user wants to show a certain screen again. To make this happen check the checkbox in the main window to automatically restore the windows.  Follow steps 3 - 6 again, and this time you will see that when the pane is automatically restored it will not retain it's original size/location.

So my questions are is this a bug and how can I achieve the behavior that I want without having to manage pane sizes/locations ourselves (since this is what the xamDockManager should be doing for us).

Thanks,

Chris

XamDockManager_Test.zip
Parents
No Data
Reply
  • 975
    Verified Answer
    posted

    I think I actually just solved my own problem, when restoring the window I need use window.Dispatcher.BeginInvoke ... and then it seems to work fine.

Children
No Data