private void AppendRtfText(string Text, Brush Color)<br />{<br /> TextRange range = new TextRange(txtChat.Document.ContentEnd, txtChat.Document.ContentEnd);<br /> range.Text = Text;<br /> range.ApplyPropertyValue(TextElement.ForegroundProperty, Color);<br />}
TextElement.ForegroundProperty
Brush
Color
<br />SolidColorBrush mySolidColorBrush = new SolidColorBrush();<br /><br />// Describes the brush's color using RGB values. <br />// Each value has a range of 0-255.<br />mySolidColorBrush.Color = Color.FromArgb(255, 0, 0, 255);<br />
var