Skip to content

Commit

Permalink
Fixing #473 by not forcing measure on window but on titlebar instead
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Sep 21, 2017
1 parent c060f62 commit 5af2051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
- [#464](../../issues/464) - Clicking on hyperlink inside of ApplicationMenu causes crash
- [#465](../../issues/465) - Clicking on ContextualGroup background or scrolling through ribbon will open disabled tab
During this fix `RibbonTabControl.GetFirstVisibleItem` was renamed to `RibbonTabControl.GetFirstVisibleAndEnabledItem`.
- [#473](../../issues/473) - RibbonWindow does not resize when Children resize and SizeToContent is used

- ### Enhancements
- `LayoutTransform` and `RenderTransform` can now be used directly on `RibbonWindow` as this now gets forwarded to the first template child of the window. Have a look at `TestWindow` in the showcase application for an example on how to use it. This was added as the fix for [#430](../../issues/430).
Expand Down
6 changes: 3 additions & 3 deletions Fluent.Ribbon/Controls/RibbonWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ private void OnLoaded(object sender, RoutedEventArgs e)

this.RunInDispatcherAsync(() =>
{
var availableSize = new Size(this.ActualWidth, this.ActualHeight);
this.Measure(availableSize);
this.Arrange(new Rect(default(Point), availableSize));
var availableSize = new Size(this.TitleBar.ActualWidth, this.TitleBar.ActualHeight);
this.TitleBar.Measure(availableSize);
this.TitleBar.ForceMeasureAndArrange();
}, DispatcherPriority.ApplicationIdle);
}

Expand Down

0 comments on commit 5af2051

Please sign in to comment.