Skip to content

Commit 30036f2

Browse files
Icons, Checkboxes, and toggle button pictures Flipping problem on RTL fixed
1 parent e5f9200 commit 30036f2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

MaterialDesignThemes.Wpf/PackIcon.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ public class PackIcon : PackIconBase<PackIconKind>
1717
static PackIcon()
1818
{
1919
DefaultStyleKeyProperty.OverrideMetadata(typeof(PackIcon), new FrameworkPropertyMetadata(typeof(PackIcon)));
20-
}
20+
}
2121

2222
public PackIcon() : base(PackIconDataFactory.Create)
23-
{ }
23+
{
24+
FlowDirection = FlowDirection.LeftToRight;
25+
}
2426
}
2527
}

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.CheckBox.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
<ColumnDefinition Width="Auto"/>
8383
<ColumnDefinition Width="*"/>
8484
</Grid.ColumnDefinitions>
85-
<Viewbox Width="18" Height="18" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
85+
<Viewbox Width="18" Height="18" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
86+
FlowDirection="LeftToRight">
8687
<Canvas Width="24" Height="24">
8788
<Path x:Name="Graphic"
8889
Data="M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"

MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.ToggleButton.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
</VisualStateManager.VisualStateGroups>
137137
<Ellipse Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="UncheckedEllipse" Opacity=".54" />
138138
<Ellipse Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" x:Name="CheckedEllipse" />
139-
<Viewbox Width="24" Height="24" x:Name="CheckMark" Visibility="Hidden" HorizontalAlignment="Center" VerticalAlignment="Center">
139+
<Viewbox Width="24" Height="24" x:Name="CheckMark" Visibility="Hidden" HorizontalAlignment="Center" VerticalAlignment="Center" FlowDirection="LeftToRight">
140140
<Canvas Width="24" Height="24">
141141
<Path Data="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z" Fill="{TemplateBinding Foreground}" />
142142
</Canvas>

0 commit comments

Comments
 (0)