Hi, I have rich text box and i save it's content to RTF file. However, i'm trying to set background color to the paragraph, but the richTextBox.Backgroung doesn't work, i also try to use the selectedText property - but it's colorize only the the text... Any idea?
A:
Hi, if you select the paragraph you want to change the background for you should be able to use richTextBox1.SelectionBackColor = Color.Blue;
.
Mikael
2010-10-28 15:21:40
i tryied it, but it colorize only the text lines (like highlited text), not all the paragraph
achi
2010-10-28 15:26:57
Hi, I probably missunderstood a little. Are you using WPF? Have you seen the examples on http://msdn.microsoft.com/en-us/library/system.windows.controls.richtextbox.aspx ? The Paragraph element should accept Brushes when setting the Background property.
Mikael
2010-10-28 15:46:31