我认为问题标题已经足够 self 解释了。
我通过 ParagraphControl.Inlines.Add(SomeStringValue)
添加了一些字符串,但在检索文本内容时遇到了一些麻烦。有什么建议吗?
我试图从 Inline
本身获取文本,然后通过 String.Join()
最佳答案
我终于成功了。
Text = String.Join(String.Empty, ParagraphControl.Inlines.Select(line => line.ContentStart.GetTextInRun(LogicalDirection.Forward)));
关于c# - 如何从段落(System.Windows.Documents)中获取整个文本内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30164626/