更改 FlowDirection 时镜像复选框勾选 [英] CheckBox tick mirrored when changing FlowDirection
问题描述
操作系统: 微软视窗 8.1开发应用程序:Microsoft Visual Studio 2013(WPF 应用程序开发)
O.S. : Microsoft Windows 8.1 Developing Application: Microsoft Visual Studio 2013 (WPF App development)
我已经从 Windows 7 转移到了 Windows 8.1,现在我在 VS2012 中开发的旧应用程序有一种奇怪的方式.因为我的语言是从右到左,所以我使用 RightToLeft
作为 FlowDirection
.它工作正常,因为所有文本都显示在 CheckBox
的左侧,但现在 CheckBox
的勾号被镜像如下:
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:
即使在从右到左的语言中,刻度符号也不正确.这是因为 O.S.或 VS2013,我该如何解决?我需要创建一个模板吗?谢谢.
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.
推荐答案
我遇到了同样的问题,这是我找到的最佳解决方案.路径是绘制刻度的原因,因此只需将其流向更改回 LeftToRight 即可使其按预期绘制.
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>
这篇关于更改 FlowDirection 时镜像复选框勾选的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!