Skip to content

Commit

Permalink
(GH-3660) Fix incorrect icon flow direction in AnimatedSingleRowTabCo…
Browse files Browse the repository at this point in the history
…ntrol style when setting flow direction RightToLeft

The flow direction is set to LeftToRight through the MahApps.Styles.ContentControl.PathIcon style. So we must override it at this template.

Closes ##3660
  • Loading branch information
punker76 committed Nov 3, 2019
1 parent fbc9481 commit 0e745d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MahApps.Metro/Controls/MetroNavigationWindow.xaml
Expand Up @@ -20,6 +20,7 @@
<ContentControl Width="20"
Height="20"
Content="M57,42V34H32.25L42.25,24H31.75L17.75,38L31.75,52H42.25L32.25,42H57Z"
FlowDirection="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}, Path=FlowDirection, Mode=OneWay}"
Style="{DynamicResource MahApps.Styles.ContentControl.PathIcon}" />
</Button>
<Button x:Name="PART_ForwardButton"
Expand All @@ -32,6 +33,7 @@
<ContentControl Width="20"
Height="20"
Content="M19,34V42H43.75L33.75,52H44.25L58.25,38L44.25,24H33.75L43.75,34H19Z"
FlowDirection="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Button}}, Path=FlowDirection, Mode=OneWay}"
Style="{DynamicResource MahApps.Styles.ContentControl.PathIcon}" />
</Button>
<Label x:Name="PART_Title"
Expand Down
Expand Up @@ -26,6 +26,7 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="{TemplateBinding Content}"
FlowDirection="{TemplateBinding FlowDirection}"
Foreground="{TemplateBinding Foreground}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Style="{DynamicResource MahApps.Styles.ContentControl.PathIcon}" />
Expand Down

0 comments on commit 0e745d2

Please sign in to comment.