如何从richtextbox中获取文本到wpf 3.5中的对象? [英] how to get text from richtextbox into object in wpf 3.5?
本文介绍了如何从richtextbox中获取文本到wpf 3.5中的对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在谷歌搜索了很多关于这个问题的文章,但我没有得到它的解决方案
请anyboby帮助我....
I have searched many articles on google for this problem but i didn''t get solution for it
please anyboby help me....
推荐答案
string GetString(RichTextBox rtb)
{
var textRange = new TextRange(rtb.Document.ContentStart, rtb.Document.ContentEnd);
return textRange.Text;
}
干杯,
Edo
Cheers,
Edo
这篇关于如何从richtextbox中获取文本到wpf 3.5中的对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文