1

我正在尝试使用

以下代码将richtextbox内容更改为类似文本。

Dim tr As New TextRange(rtb.Document.ContentStart, rtb.Document.ContentEnd)

documentText = tr

        Dim titleMatch As Match = Regex.Match(documentText, expression, options)

但它说没有定义类型'TextRange'。任何建议,请。

4

1 回答 1

4

您需要导入System.Windows.Documents.

您可以通过查看TextRange 的文档来了解这一点:

命名空间:System.Windows.Documents

程序集:PresentationFramework(在 PresentationFramework.dll 中)

于 2013-06-03T15:43:21.537 回答