Chinaunix首页 | 论坛 | 博客
  • 博客访问: 12377193
  • 博文数量: 1293
  • 博客积分: 13501
  • 博客等级: 上将
  • 技术积分: 17974
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-08 18:11
文章分类

全部博文(1293)

文章存档

2019年(1)

2018年(1)

2016年(118)

2015年(257)

2014年(128)

2013年(222)

2012年(229)

2011年(337)

分类: C#/.net

2016-03-24 16:00:46

WPF:
  1. private string GetText(RichTextBox richTextBox)
  2. {
  3.         TextRange textRange = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);
  4.         return textRange.Text;
  5. }

ST:
  1. var run = describeRichTextBox.Selection.Start.Parent as Run;
  2. if (run != null)
  3.  {
  4.     string str = run.Text;
  5.  }

转自网址:
http://blog.csdn.net/wushang923/article/details/11048645
阅读(2298) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~