I am trying to set/get the text of my RichTextBox, but Text is not among list of its properties when I want to get test.Text...
I am using code behind in C# (.net framework 3.5 SP1)
RichTextBox test = new RichTextBox();
cannot have test.Text(?)
Do you know how come it can be possible ?
"Extended WPF Toolkit" now provides a richtextbox with the Text property.
You can get or set the text in different formats (XAML, RTF and plaintext).
Here is the link: Extended WPF Toolkit RichTextBox
OR
Using two extension methods, this becomes very easy:
There was a confusion between RichTextBox in System.Windows.Forms and in System.Windows.Control
I am using the one in the Control as I am using WPF. In there, there is no Text property, and in order to get a text, I should have used this line:
thanks
to set RichTextBox text:
to get RichTextBox text: