Reputation: 11
Watch this image:
TextRange tr = new TextRange(richTextBox1.Document.ContentStart, richTextBox1.Document.ContentEnd);
Error
system.windows.forms.richtextbox
does not contain document
Upvotes: 1
Views: 634
Reputation: 3065
It is like your error message already tries to tell you.
The RichTextBox
class definition in WinForms
doesn't contain a property Document.
You could assign your content to the richTextBox1.text
property or use richTextBox1.LoadFile()
. Please have a look at the MSDN documentation:
RichTextBox Class
Upvotes: 1