Skip to content

Commit

Permalink
Finally fixes #454 by forcing SizeToContent.Manual when maximized
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Sep 5, 2017
1 parent 4aae86f commit 86c78be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Fluent.Ribbon/Controls/RibbonWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ protected override void OnStateChanged(EventArgs e)
{
base.OnStateChanged(e);

// todo: remove fix if we update to ControlzEx 4.0
if (this.WindowState == WindowState.Maximized
&& this.SizeToContent != SizeToContent.Manual)
{
this.SizeToContent = SizeToContent.Manual;
}

this.RunInDispatcherAsync(() => this.TitleBar?.ForceMeasureAndArrange(), DispatcherPriority.Background);
}

Expand Down

0 comments on commit 86c78be

Please sign in to comment.