简体   繁体   English

system.windows.forms.richtextbox 不包含 C# 中的文档

[英]system.windows.forms.richtextbox does not contain document in C#

Watch this image:看这张图片:

在此处输入图片说明

TextRange tr = new TextRange(richTextBox1.Document.ContentStart, richTextBox1.Document.ContentEnd);

Error system.windows.forms.richtextbox does not contain document错误system.windows.forms.richtextbox不包含文档

It is like your error message already tries to tell you.就像您的错误消息已经尝试告诉您一样。

The RichTextBox class definition in WinForms doesn't contain a property Document. WinForms中的RichTextBox类定义不包含属性 Document。

You could assign your content to the richTextBox1.text property or use richTextBox1.LoadFile() .您可以将您的内容分配给richTextBox1.text属性或使用richTextBox1.LoadFile() Please have a look at the MSDN documentation: RichTextBox Class请查看 MSDN 文档: RichTextBox Class

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.Windows.Forms.RichTextBox的TextBoxBase.ClearUndo()实现 - System.Windows.Forms.RichTextBox's implementation of TextBoxBase.ClearUndo() 在System.Windows.Forms.RichTextBox中禁用VScrollbar的绘制 - Disable Painting of the VScrollbar in a System.Windows.Forms.RichTextBox 将任意应用程序数据存储在System.Windows.Forms.RichTextBox中 - Store arbitrary application data in System.Windows.Forms.RichTextBox 不存在从对象类型 System.Windows.Forms.RichTextBox 到已知托管提供程序本机类型的映射。 - No mapping exists from object type System.Windows.Forms.RichTextBox to a known managed provider native type.' 如何在System.Windows.Forms.RichTextBox上附加\\ line而不是\\ par - How can you append a \line, not a \par to a System.Windows.Forms.RichTextBox Visual C#错误:System.Windows.Forms.Button不包含ToInt32的定义 - Visual C# Error: System.Windows.Forms.Button does not contain a definition for ToInt32 在richTextBox 中搜索单词(windows 窗体,c#) - Searching for words in richTextBox (windows forms, c#) C#-richTextBox Windows窗体中的行编号 - C# - Numbering lines in richTextBox Windows Forms C#Windows窗体-Richtextbox上的滚动条第二次不显示 - C# Windows Forms - Scrollbar on Richtextbox does not show up for a second time 'System.Windows.Rect'不包含C#的'Intersects'定义 - 'System.Windows.Rect' does not contain a definition for 'Intersects' for C#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM