Toa*_*ums 8 c# wpf xaml direction
我有一个FormattedText项目.我将flowdirection设置为RightToLeft,我不确定它是如何工作的.它真的不一致地改变了我的字符串.
我想象它只需要一个字符串,并向后显示(通过字符或单词),但在测试中它确实是奇怪的事情.
==================================================
例子,
the string "90%", is displayed as "%90"
Run Code Online (Sandbox Code Playgroud)
为什么%符号从结尾开始?
the string "12 34 56 this is my (string)"
is displayed as "(this is my (string 56 34 12"
Run Code Online (Sandbox Code Playgroud)
为什么数字会结束,一个括号进入开头并切换方向?
the string "this is a string"
is displayed as "this is a string"
Run Code Online (Sandbox Code Playgroud)
在这种情况下为什么没有发生?
==================================================
我的formattedText看起来像这样:
FormattedText sectionNum = new FormattedText(
sectNum,
CultureInfo.CurrentCulture,
FlowDirection.RightToLeft,
new Typeface("Verdana"),
14,
Brushes.Black);
context.DrawText(sectionNum, new Point(790 - 96, 20));
Run Code Online (Sandbox Code Playgroud)
有谁知道发生了什么?当设置为RightToLeft时,我需要能够显示每个字符串,使其与LeftToRight读取相同.
谢谢!
| 归档时间: |
|
| 查看次数: |
3934 次 |
| 最近记录: |