title: Why does RichTextBox implicitly add newline?
body: <p>I have class <code>Foo</code> derived from <code>RichTextBox</code>, which has private method <code>add_text</code> and I came across that it gives wrong results. For examples, instead of added text <code>x</code> it gives <code>x\r\n</code>. What is the problem of <code>RichTextBox</code> class? before usage of <code>add_text</code> method I cleared content with <code>Document.Blocks.Clear()</code> command</p>
  
  <pre><code>// Appends text to the end with specified selection colors
  private void add_text(string text, Brush foreground_brush, Brush background_brush)
  {
      // here new TextRange(Document.ContentStart, Document.ContentEnd).Text gives ""
  
      TextRange text_range = new TextRange(Document.ContentEnd, Document.ContentEnd);
      text_range.Text = text;
      // Here new TextRange(Document.ContentStart, Document.ContentEnd).Text gives "x\r\n"
  
      text_range.ApplyPropertyValue(TextElement.BackgroundProperty, background_brush);
      text_range.ApplyPropertyValue(TextElement.ForegroundProperty, foreground_brush);
  }
  </code></pre>
  
  <p>UPD: <code>AppendText</code> command gives the same result (<code>\r\n</code> characters were added)</p>