-
private string GetText(RichTextBox richTextBox)
-
{
-
TextRange textRange = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);
-
return textRange.Text;
- }
ST:
-
var run = describeRichTextBox.Selection.Start.Parent as Run;
-
if (run != null)
-
{
-
string str = run.Text;
- }
转自网址:
http://blog.csdn.net/wushang923/article/details/11048645