流在我的WPF窗口方向设置为从右至左,像这样:
< TextBlock中的FlowDirection =从右至左X:名称=测试>
在code,如果我做的 test.Text =(2/3);
我看
(2/3)
但是,如果我做的 test.Text =航空自卫队(2/3);
我看
(航空自卫队(2/3
这是怎么回事呢?为什么是它开始用字符串文本改变了支架的定位是什么?
解决方案我不知道,但另一个更复杂的解决方法是:
周五,2010年2月12日5:10 PM 奔龙科 - MSFT
不幸的是,这是一个错误,我们 最近发现。你可能会 能够解决此问题由 puttting一些看不见的非 在结束标点符号的文字您 像这样的内容:
{例如修改}
< TextBlock中的FlowDirection =从右至左X:名称=测试>
<润GT;标签1(CMS)< /运行>
<运行字号=&GT01。I< /运行>
< / TextBlock的>
来源: 的http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/3a723659-2bac-4d0c-80d8-09ba38e6cec1
Flow direction in my WPF window is set to RightToLeft like so:
<TextBlock FlowDirection="RightToLeft" x:Name="test">
In code if I do test.Text = "(2/3)";
I see
(2/3)
But if I do test.Text = "asdf (2/3)";
I see
(asdf (2/3
What's going on here? Why is it that starting the text with a string changes the positioning of the brackets?
解决方案I am not sure, but another more complex workaround is:
Friday, February 12, 2010 5:10 PM Ben Ronco - MSFT
Unfortunately this is a bug that we have recently discovered. You may be able to work around this issue by puttting some "invisible" non punctuation text at the end of your content like this:
{example modified}
<TextBlock FlowDirection="RightToLeft" x:Name="test">
<Run>Label1 (cms)</Run>
<Run FontSize=".01">i</Run>
</TextBlock>
Source: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/3a723659-2bac-4d0c-80d8-09ba38e6cec1