[英]vb.net What do I need to import to use textrange?
I'm trying to use 我正在尝试使用
following code to change richtextbox content to text like. 以下代码将richtextbox内容更改为文本。
Dim tr As New TextRange(rtb.Document.ContentStart, rtb.Document.ContentEnd)
documentText = tr
Dim titleMatch As Match = Regex.Match(documentText, expression, options)
But it says Type 'TextRange' is not defined. 但是它没有定义Type'TextRange'。 Any advice, please.
请给我任何建议。
You need to import System.Windows.Documents
. 您需要导入
System.Windows.Documents
。
You can see this by looking at the documentation for TextRange : 您可以通过查看TextRange的文档来查看 :
Namespace: System.Windows.Documents
命名空间:System.Windows.Documents
Assembly: PresentationFramework (in PresentationFramework.dll)
汇编:PresentationFramework(在PresentationFramework.dll中)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.