Skip to content

Commit 32eaee9

Browse files
Fixes TreeViewItem chevron arrow orientation in RightToLeft flow direction mode (#10744)
Co-authored-by: Dipesh Kumar <[email protected]>
1 parent 1e12eec commit 32eaee9

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Styles/TreeViewItem.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<system:Double x:Key="TreeViewItemChevronSize">10</system:Double>
1515
<system:Double x:Key="TreeViewItemFontSize">14</system:Double>
1616
<system:String x:Key="TreeViewChevronRightGlyph">&#xE76C;</system:String>
17+
<system:String x:Key="TreeViewChevronLeftGlyph">&#xE76B;</system:String>
1718

1819
<Style x:Key="ExpandCollapseToggleButtonStyle" TargetType="{x:Type ToggleButton}">
1920
<!-- Universal WPF UI focus -->
@@ -43,6 +44,9 @@
4344
Text="{StaticResource TreeViewChevronRightGlyph}" />
4445
</Grid>
4546
<ControlTemplate.Triggers>
47+
<Trigger Property="FlowDirection" Value="RightToLeft">
48+
<Setter TargetName="ChevronIcon" Property="Text" Value="{StaticResource TreeViewChevronLeftGlyph}" />
49+
</Trigger>
4650
<Trigger Property="IsChecked" Value="True">
4751
<Trigger.EnterActions>
4852
<BeginStoryboard>

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Dark.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5230,6 +5230,7 @@
52305230
<system:Double x:Key="TreeViewItemChevronSize">10</system:Double>
52315231
<system:Double x:Key="TreeViewItemFontSize">14</system:Double>
52325232
<system:String x:Key="TreeViewChevronRightGlyph"></system:String>
5233+
<system:String x:Key="TreeViewChevronLeftGlyph"></system:String>
52335234
<Style x:Key="ExpandCollapseToggleButtonStyle" TargetType="{x:Type ToggleButton}">
52345235
<!-- Universal WPF UI focus -->
52355236
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultCollectionFocusVisualStyle}" />
@@ -5247,6 +5248,9 @@
52475248
<TextBlock x:Name="ChevronIcon" VerticalAlignment="Center" FontSize="{StaticResource TreeViewItemChevronSize}" FontFamily="{DynamicResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="{StaticResource TreeViewChevronRightGlyph}" />
52485249
</Grid>
52495250
<ControlTemplate.Triggers>
5251+
<Trigger Property="FlowDirection" Value="RightToLeft">
5252+
<Setter TargetName="ChevronIcon" Property="Text" Value="{StaticResource TreeViewChevronLeftGlyph}" />
5253+
</Trigger>
52505254
<Trigger Property="IsChecked" Value="True">
52515255
<Trigger.EnterActions>
52525256
<BeginStoryboard>

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.HC.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5170,6 +5170,7 @@
51705170
<system:Double x:Key="TreeViewItemChevronSize">10</system:Double>
51715171
<system:Double x:Key="TreeViewItemFontSize">14</system:Double>
51725172
<system:String x:Key="TreeViewChevronRightGlyph"></system:String>
5173+
<system:String x:Key="TreeViewChevronLeftGlyph"></system:String>
51735174
<Style x:Key="ExpandCollapseToggleButtonStyle" TargetType="{x:Type ToggleButton}">
51745175
<!-- Universal WPF UI focus -->
51755176
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultCollectionFocusVisualStyle}" />
@@ -5187,6 +5188,9 @@
51875188
<TextBlock x:Name="ChevronIcon" VerticalAlignment="Center" FontSize="{StaticResource TreeViewItemChevronSize}" FontFamily="{DynamicResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="{StaticResource TreeViewChevronRightGlyph}" />
51885189
</Grid>
51895190
<ControlTemplate.Triggers>
5191+
<Trigger Property="FlowDirection" Value="RightToLeft">
5192+
<Setter TargetName="ChevronIcon" Property="Text" Value="{StaticResource TreeViewChevronLeftGlyph}" />
5193+
</Trigger>
51905194
<Trigger Property="IsChecked" Value="True">
51915195
<Trigger.EnterActions>
51925196
<BeginStoryboard>

src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Themes/Fluent.Light.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5239,6 +5239,7 @@
52395239
<system:Double x:Key="TreeViewItemChevronSize">10</system:Double>
52405240
<system:Double x:Key="TreeViewItemFontSize">14</system:Double>
52415241
<system:String x:Key="TreeViewChevronRightGlyph"></system:String>
5242+
<system:String x:Key="TreeViewChevronLeftGlyph"></system:String>
52425243
<Style x:Key="ExpandCollapseToggleButtonStyle" TargetType="{x:Type ToggleButton}">
52435244
<!-- Universal WPF UI focus -->
52445245
<Setter Property="FocusVisualStyle" Value="{DynamicResource DefaultCollectionFocusVisualStyle}" />
@@ -5256,6 +5257,9 @@
52565257
<TextBlock x:Name="ChevronIcon" VerticalAlignment="Center" FontSize="{StaticResource TreeViewItemChevronSize}" FontFamily="{DynamicResource SymbolThemeFontFamily}" HorizontalAlignment="Center" Text="{StaticResource TreeViewChevronRightGlyph}" />
52575258
</Grid>
52585259
<ControlTemplate.Triggers>
5260+
<Trigger Property="FlowDirection" Value="RightToLeft">
5261+
<Setter TargetName="ChevronIcon" Property="Text" Value="{StaticResource TreeViewChevronLeftGlyph}" />
5262+
</Trigger>
52595263
<Trigger Property="IsChecked" Value="True">
52605264
<Trigger.EnterActions>
52615265
<BeginStoryboard>

0 commit comments

Comments
 (0)