我有一个FormattedText项。我将flowdirection设置为从右到左,并不确定它是如何工作的。它会不一致地更改我的字符串。
我想象它只是拿一个字符串,并将其倒过来显示(按字符或按单词),但在测试中它做了奇怪的事情。
==================================================
例子:
the string "90%", is displayed as "%90"
为什么百分号在结尾和开头之间移动?
the string "12 34 56 this is my (string)"
is displayed as "(this is my (string 56 34 12"
为什么数字移到末尾,一个括号移到开头并改变方向?
the string "this is a string"
is displayed as "this is a string"
为什么在这种情况下什么都不会发生?
==================================================
我的formattedText看起来像这样:
FormattedText sectionNum = new FormattedText(
sectNum,
CultureInfo.CurrentCulture,
FlowDirection.RightToLeft,
new Typeface("Verdana"),
14,
Brushes.Black);
context.DrawText(sectionNum, new Point(790 - 96, 20));
有人知道发生了什么吗?我需要能够显示每个字符串,使其在设置为从右到左时与从左到右的阅读方式相同。
谢谢!