Maximized ToolWindow (2nd monitor) incorrectly restored

Docking/MDI for WPF Forum

Posted 14 years ago by Jb RIGUET
Version: 10.2.0533
Avatar
Hi,

still in the process of evaluating WPF Studio, using the docking and MDI solution, i found that rafting toolwindow, maximized on the 2nd screen are not restored as maximized on the 2nd screen, but restored as normal state. I'm using the DockSiteLayoutSerializer object to do this, as in the Layout QuickStart "Persistence" sample you provide. (Which is reproducing the exact same behavior, just get a toolwindow on the 2nd monitor, maximize it, close and start the sample, it's on the second window, on correct coordinate, but incorrect state).

Did you fixed this in the upcoming version, or plan to fix it (or maybe you didn't even noticed this behavior), or, do you have any workaround in the mean time ?

Regards,

JB.

Comments (6)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi JB,

Thanks for reporting this issue. We've corrected this issue for the next maintenance release. Unfortunately, there isn't currently a workaround for this issue.


Actipro Software Support

Posted 14 years ago by Jb RIGUET
Avatar
Well, if it's corrected, that's great enough :) Thanks.
Posted 14 years ago by Jb RIGUET
Avatar
It's now fixed in the 2011.1 release. Thanks.
Posted 14 years ago by Kevin Drapel
Avatar
Is it really fixed in 2011.1 ? Because we still encounter this issue in our case.

We have the main application on the left screen, maximized. A floating window in right screen, maximized as well (it's a ToolWindow).
    When we minimize the main application, the floating window is minimized as well (ok).
    When we maximize the main application, the floating window is restored back to the original size (nok).
Note that I can reproduce the problem with the Sample Browser, "Docking" -> "Features (external Window)". The "Solution explorer" toolwindow on the 2nd screen and the main demo application on the 1st screen (Windows 7 - x64).

[Modified at 02/18/2011 04:08 AM]
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kevin,

The original issue has to do with restoring windows from a previously saved layout. I believe, the issue you describe is a general WPF issue. You'd need to manually save/restore the previous state by adding the following code to your main window:
protected override void OnStateChanged(EventArgs e) {
    if (this.WindowState == WindowState.Minimized) {
        foreach (Window w in this.OwnedWindows) {
            w.Tag = w.WindowState;
            w.WindowState = WindowState.Minimized;
        }
    }
    else {
        this.Dispatcher.BeginInvoke((Action) (() => {
        foreach (Window w in this.OwnedWindows) {
            if (w.Tag is WindowState)
                w.WindowState = (WindowState)w.Tag;
            w.Tag = null;
        }
        }));
    }
 
    base.OnStateChanged(e);
}


Actipro Software Support

Posted 14 years ago by Kevin Drapel
Avatar
Thanks for your code snippet. This works like a charm.
The latest build of this product (v24.1.3) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.