WPF RichTextBox的问题 [英] WPF richTextBox question
本文介绍了WPF RichTextBox的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果一行文字包裹到一个额外的行,我怎么确定编程字符串它被打破了点
If a line of text is wrapped to an additional line, how do I determine programmatically the point in the string where it was broken.
例如:输入字符串= 这是一个文本换行的测试
Example: Input string = "This is a test of a wrapped line of text".
Based on the width of the richTextBox it could display:
This is a test of a wrapped line of
text.
我需要什么,以确定该包裹得到了这个词(S)的行偏移。在上述情况下单词文本。
What I need to determine is offset in the line of the word(s) that got wrapped. In the above case the word "text".
当我从RichTextBox中提取的XAML中,我得到的原始文本展开。
When I extract the Xaml from the richTextBox, I get the original text unwrapped.
谢谢,
鲍勃Kerlinger
Bob Kerlinger
推荐答案
但 startOfFirstLine.GetLineStartPosition(1)
收益空
这篇关于WPF RichTextBox的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文