title: wpf:Rich text box runtime under line, not Woking while get back from database
body: <p>I am using the WPF RichTextBox.
  I do run time formatting such as make under line. It normally works fine. But after reload from database it is not working properly. 
  This is the sample code what I am using.</p>
  
  <pre><code>var selection = TxtRtf1.Selection;
  if (!selection.IsEmpty)
  {
     var tdc =(TextDecorationCollection) selection.GetPropertyValue(Inline.TextDecorationsProperty);
     if (tdc == null || !tdc.Equals(TextDecorations.Underline))
        selection.ApplyPropertyValue(Run.TextDecorationsProperty, TextDecorations.Underline);
     else
        selection.ApplyPropertyValue(Inline.TextDecorationsProperty, null);
  }
  </code></pre>
  
  <p>Actual what happen  &lt;<strong>tdc.Equals(TextDecorations.Underline)</strong>>  return always false; after data read from database.</p>