O.S. : Microsoft Windows 8.1 Developing Application: Microsoft Visual Studio 2013 (WPF App development)
I have moved from Windows 7 to Windows 8.1 and now my old apps which i had developed in VS2012 have a weird manner. because my language is right-to-left, i use RightToLeft
for FlowDirection
. it was working fine as all text was showing on the left side of CheckBox
but now the tick sign of CheckBox
is mirrored like this:
the tick sign is not correct even in a right-to-left language. is this because O.S. or the VS2013 and how can i fix it? do i need to create a template? thanks.
I had the same problem, and this is the best solution i found. The path is what draws the tick, so just changing its flow direction back to LeftToRight makes it draw as you would expect.
<CheckBox Content="My Checkbox" FlowDirection="RightToLeft">
<CheckBox.Resources>
<Style TargetType="{x:Type Path}">
<Setter Property="FlowDirection" Value="LeftToRight"/>
</Style>
</CheckBox.Resources>
</CheckBox>
<Grid>
<Grid.Resources>
<Style x:Key="ArabicStyle" TargetType="{x:Type CheckBox}">
<Style.Resources>
<Style TargetType="{x:Type Path}">
<Setter Property="FlowDirection" Value="LeftToRight"/>
</Style>
</Style.Resources>
</Style>
</Grid.Resources>
<CheckBox Content="My Checkbox:" Style="{StaticResource ArabicStyle}"/>
</Grid>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With