在 RichTextBox 中获取文本后,我想清除文本。我该怎么做?
TextRange txt = new TextRange(richtxtSNotice.Document.ContentStart, richtxtSNotice.Document.ContentEnd);
MessageBox.Show(txt.Text);
最佳答案
使用以下内容:
_richTextBox.Document.Blocks.Clear();
关于c# - 如何清除RichTextBox中的文本内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10805134/