Skip to content

Commit

Permalink
Fixes #430 by forwarding LayoutTransform from the window to its child
Browse files Browse the repository at this point in the history
  • Loading branch information
batzen committed Jun 15, 2017
1 parent a05dda2 commit f69f8a7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@
- [#419](../../issues/419) - BackstageTabItem Is Never Deselected if BackstageTabControl is not Logical Parent
- [#428](../../issues/428) - Values from DependencyProperties with FrameworkPropertyMetadataOptions.Inherits are not properly inherited from Ribbon to Menu, StartScreen and some other children
This also overrules the fix made for [#415](../../issues/415).
- [#430](../../issues/430) - No Rezising at Fluent:RibbonContextualTabGroup at Version 5.0
- [#438](../../issues/438) - Titlebar icon missing left margin when maximized

- ### Enhancements
- `LayoutTransform` and `RenderTransform` can now be used directly on `RibbonWindow` as this now gets forwarded to the first template child of the window. This was added as the fix for [#430](../../issues/430).
- [#275](../../issues/275) - Option for customizing the quick access toolbar access keys
`QuickAccessToolBar` now has a property called `UpdateKeyTipsAction` which accepts an instance of `QuickAccessToolBar` through which you can create your own keytips for items in the toolbar.
Look at the UnitTest `QuickAccessToolBarTests.TestCustomKeyTips` for a sample.
Expand Down
5 changes: 5 additions & 0 deletions Fluent.Ribbon.Showcase/MahMetroWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
x:Name="window"
TitleCharacterCasing="Normal"
WindowState="Normal">
<Metro:MetroWindow.LayoutTransform>
<ScaleTransform ScaleX="{Binding DataContext.Zoom, Source={x:Reference TestContent} }"
ScaleY="{Binding DataContext.Zoom, Source={x:Reference TestContent}}" />
</Metro:MetroWindow.LayoutTransform>

<Metro:MetroWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down
9 changes: 2 additions & 7 deletions Fluent.Ribbon.Showcase/TestContent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Fill="{DynamicResource BlackBrush}"
Data="F1 M 52.7514,25.076C 53.4111,25.7534 54.0258,26.4933 54.5953,27.296C 55.1649,28.0987 55.6564,28.9607 56.0698,29.8821C 56.4832,30.8035 56.8065,31.7766 57.0396,32.8014C 57.2727,33.8262 57.3892,34.8883 57.3892,35.9878C 57.3892,37.0566 57.276,38.1517 57.0495,39.2733C 56.823,40.3948 56.4491,41.5394 55.928,42.7071C 55.4068,43.8748 54.713,45.07 53.8465,46.2927C 52.9801,47.5154 51.9069,48.7601 50.6271,50.0267C 50.2137,50.4358 49.7431,50.902 49.2153,51.4253C 48.6875,51.9487 48.1278,52.5029 47.5363,53.0878C 46.9447,53.6728 46.34,54.2742 45.722,54.8922C 45.1041,55.5101 44.4983,56.1072 43.9045,56.6833C 42.5323,58.0424 41.1029,59.4586 39.6163,60.9319L 35.3545,56.6239C 36.8235,55.1638 38.2441,53.7542 39.6163,52.3951C 40.1969,51.819 40.7994,51.2252 41.424,50.6139C 42.0485,50.0025 42.6565,49.4011 43.2481,48.8095C 43.8396,48.218 44.3993,47.6605 44.9271,47.1371C 45.4549,46.6138 45.9255,46.1476 46.3389,45.7385C 48.0146,44.0584 49.2758,42.3904 50.1224,40.7345C 50.969,39.0786 51.3924,37.4678 51.3924,35.9021C 51.3924,34.719 51.1516,33.5777 50.67,32.4781C 50.1884,31.3786 49.4528,30.3406 48.4632,29.3642C 48.2169,29.1179 47.9112,28.8848 47.5462,28.6649C 47.1811,28.445 46.7688,28.2526 46.3092,28.0877C 45.8496,27.9227 45.3482,27.7886 44.805,27.6852C 44.2619,27.5819 43.6868,27.5302 43.0799,27.5302C 42.4641,27.5302 41.8198,27.5929 41.1469,27.7182C 40.474,27.8436 39.7933,28.0503 39.105,28.3384C 38.4167,28.6264 37.7218,29.0036 37.0203,29.4698C 36.3188,29.936 35.6316,30.5056 34.9587,31.1785L 30.466,35.6976L 37.4986,42.75L 19,42.75L 19,24.5417L 25.9931,31.4094L 30.5056,26.8705C 31.5083,25.7446 32.5463,24.8275 33.6194,24.1194C 34.6926,23.4113 35.7646,22.8616 36.8356,22.4701C 37.9065,22.0787 38.972,21.8148 40.0319,21.6785C 41.0919,21.5421 42.1079,21.474 43.0799,21.474C 44.087,21.474 45.0579,21.563 45.9925,21.7411C 46.9271,21.9193 47.8068,22.17 48.6314,22.4932C 49.4561,22.8165 50.2148,23.198 50.9075,23.6378C 51.6002,24.0777 52.2148,24.5571 52.7514,25.076 Z " />
</Canvas>

<ObjectDataProvider MethodName="GetValues"
ObjectType="{x:Type ResizeMode}"
x:Key="ResizeModeEnumValues">
Expand All @@ -44,12 +44,7 @@
</ObjectDataProvider>
</ResourceDictionary>
</UserControl.Resources>

<UserControl.LayoutTransform>
<ScaleTransform ScaleX="{Binding Zoom}"
ScaleY="{Binding Zoom}" />
</UserControl.LayoutTransform>


<Grid>
<Grid.Resources>
<Style x:Key="GalleryItemStyleWithCustomContextMenu"
Expand Down
4 changes: 4 additions & 0 deletions Fluent.Ribbon.Showcase/TestWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
MinHeight="60"
mc:Ignorable="d"
WindowState="Normal">
<Fluent:RibbonWindow.LayoutTransform>
<ScaleTransform ScaleX="{Binding DataContext.Zoom, Source={x:Reference TestContent} }"
ScaleY="{Binding DataContext.Zoom, Source={x:Reference TestContent}}" />
</Fluent:RibbonWindow.LayoutTransform>
<FluentTest:TestContent x:Name="TestContent" />
</Fluent:RibbonWindow>
3 changes: 2 additions & 1 deletion Fluent.Ribbon/Themes/RibbonWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

<ControlTemplate x:Key="RibbonWindowControlTemplate"
TargetType="{x:Type Fluent:RibbonWindow}">
<Grid>
<Grid LayoutTransform="{Binding LayoutTransform, RelativeSource={RelativeSource TemplatedParent}}"
RenderTransform="{Binding RenderTransform, RelativeSource={RelativeSource TemplatedParent}}">
<AdornerDecorator x:Name="Adorner">
<Grid Background="{TemplateBinding Background}">
<Grid.RowDefinitions>
Expand Down

0 comments on commit f69f8a7

Please sign in to comment.