小编Bob*_*ger的帖子

WPF richTextBox问题

如果一行文本被包装到另一行,我如何以编程方式确定字符串中断点的位置.

示例:输入字符串="这是对包装的文本行的测试".

      Based on the width of the richTextBox it could display:


            This is a test of a wrapped line of
            text.
Run Code Online (Sandbox Code Playgroud)

我需要确定的是被包裹的单词行中的偏移量.在上面的例子中,单词"文本".

当我从richTextBox中提取Xaml时,我得到原始文本解包.

谢谢,

鲍勃克林格

c# wpf richtextbox

6
推荐指数
1
解决办法
3774
查看次数

标签 统计

c# ×1

richtextbox ×1

wpf ×1