如何从WPF (System.Windows.Controls.Primitives) TextBoxBase获取.Text。代码如下: this.mTextBox.Text; string other = new TextRange(((RichTextBox)sender).Document.ContentStart, ((<em
我正在尝试让我的WPFRichTextBox看起来像一个编码页面。
我标记了一些单词来确定它是一个关键字还是一个字符串。因为我的WPFRichTextBox是用FlowDocument内部构建的,所以我们不能通过像String st = myRichtextBox.Text这样的东西来获取内容文本,我们需要使用TextRange来获取其中的文本:TextRange tr = new TextRange(rtb.Document.ContentSta