using System.Windows; namespace WpfRichTextBox { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); new System.Windows.Documents.TextRange(customRichTextBox.Document.ContentStart, customRichTextBox.Document.ContentEnd).Text = "Hello World!"; if (customRichTextBox.RichChars.Count > 0) { customRichTextBox.RichChars[0].Color = System.Windows.Media.Colors.Red; customRichTextBox.RichChars[0].Position = new System.Windows.Point(50, 50); customRichTextBox.InvalidateVisual(); } } } }