Skip to content

Commit

Permalink
Fixed Issue 226: Owned/maximized floating windows (LayoutFloatingWind…
Browse files Browse the repository at this point in the history
…owControl) do not restore to maximized state when the owner (DockingManager) window is restored from being minimized.
  • Loading branch information
moellerm committed Jan 4, 2023
1 parent e9b337d commit df8109c
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,21 @@ private set
protected override void OnStateChanged(EventArgs e)
{
if (!_isInternalChange)
UpdateMaximizedState(WindowState == WindowState.Maximized);
{
if (WindowState == WindowState.Maximized)
{
// Forward external changes to WindowState from any state to a new Maximized state
// to the LayoutFloatingWindowControl internal representation.
UpdateMaximizedState(true);
}
else if (IsMaximized && OwnedByDockingManagerWindow)
{
// Override any external changes to WindowState when owned and in Maximized state.
// This override fixes the issue of an owned LayoutFloatingWindowControl loosing
// its Maximized state when the owner window is restored from a Minimized state.
WindowState = WindowState.Maximized;
}
}

base.OnStateChanged(e);
}
Expand Down

0 comments on commit df8109c

Please sign in to comment.