Skip to content

Commit ea0a13d

Browse files
authored
Fixes arrow direction for expander when FlowDirection is set to RightToLeft (#10804)
1 parent b7f5416 commit ea0a13d

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@
177177
</Grid>
178178
</Grid>
179179
<ControlTemplate.Triggers>
180+
<Trigger Property="FlowDirection" Value="RightToLeft">
181+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronRightGlyph}" />
182+
</Trigger>
180183
<Trigger Property="IsChecked" Value="True">
181184
<Trigger.EnterActions>
182185
<BeginStoryboard>
@@ -237,6 +240,9 @@
237240
</Grid>
238241
</Grid>
239242
<ControlTemplate.Triggers>
243+
<Trigger Property="FlowDirection" Value="RightToLeft">
244+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronLeftGlyph}" />
245+
</Trigger>
240246
<Trigger Property="IsChecked" Value="True">
241247
<Trigger.EnterActions>
242248
<BeginStoryboard>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2599,6 +2599,9 @@
25992599
</Grid>
26002600
</Grid>
26012601
<ControlTemplate.Triggers>
2602+
<Trigger Property="FlowDirection" Value="RightToLeft">
2603+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronRightGlyph}" />
2604+
</Trigger>
26022605
<Trigger Property="IsChecked" Value="True">
26032606
<Trigger.EnterActions>
26042607
<BeginStoryboard>
@@ -2632,6 +2635,9 @@
26322635
</Grid>
26332636
</Grid>
26342637
<ControlTemplate.Triggers>
2638+
<Trigger Property="FlowDirection" Value="RightToLeft">
2639+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronLeftGlyph}" />
2640+
</Trigger>
26352641
<Trigger Property="IsChecked" Value="True">
26362642
<Trigger.EnterActions>
26372643
<BeginStoryboard>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,6 +2512,9 @@
25122512
</Grid>
25132513
</Grid>
25142514
<ControlTemplate.Triggers>
2515+
<Trigger Property="FlowDirection" Value="RightToLeft">
2516+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronRightGlyph}" />
2517+
</Trigger>
25152518
<Trigger Property="IsChecked" Value="True">
25162519
<Trigger.EnterActions>
25172520
<BeginStoryboard>
@@ -2545,6 +2548,9 @@
25452548
</Grid>
25462549
</Grid>
25472550
<ControlTemplate.Triggers>
2551+
<Trigger Property="FlowDirection" Value="RightToLeft">
2552+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronLeftGlyph}" />
2553+
</Trigger>
25482554
<Trigger Property="IsChecked" Value="True">
25492555
<Trigger.EnterActions>
25502556
<BeginStoryboard>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,6 +2608,9 @@
26082608
</Grid>
26092609
</Grid>
26102610
<ControlTemplate.Triggers>
2611+
<Trigger Property="FlowDirection" Value="RightToLeft">
2612+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronRightGlyph}" />
2613+
</Trigger>
26112614
<Trigger Property="IsChecked" Value="True">
26122615
<Trigger.EnterActions>
26132616
<BeginStoryboard>
@@ -2641,6 +2644,9 @@
26412644
</Grid>
26422645
</Grid>
26432646
<ControlTemplate.Triggers>
2647+
<Trigger Property="FlowDirection" Value="RightToLeft">
2648+
<Setter TargetName="ControlChevronIcon" Property="Text" Value="{StaticResource ExpanderChevronLeftGlyph}" />
2649+
</Trigger>
26442650
<Trigger Property="IsChecked" Value="True">
26452651
<Trigger.EnterActions>
26462652
<BeginStoryboard>

0 commit comments

Comments
 (0)