I am loading a .rtf file into a WPF Rich TextBox and my images that have links are getting this underline property added. I do not want the underline and cant seem to get rid of it.

              public MainWindow()
    {
        InitializeComponent();

        Assembly assembly = Assembly.GetExecutingAssembly();


        Stream s =  assembly.GetManifestResourceStream("WPFRichTextIssue.Sigs.MSC.rtf");
        using (s)
        {
             TextRange TR = new TextRange(RTB.Document.ContentStart, RTB.Document.ContentEnd);

        TR.Load(s, DataFormats.Rtf);
        }

    }


I have tired to find the underlined images with

  if (TR.GetPropertyValue(Inline.TextDecorationsProperty) == TextDecorations.Underline)
            {

            }
            else
            {
                // Do something
            }


But the Image is not Inline.Text so it does not find it... Any help would be great.

I also thought maybe i could overwrite the Rich Textbox default functionality that causes the underline of links but all i can seem to find to make that change is to the Inline Text nothing for the images and the images are not affected. 

The only other option i can think is if there was a way to change the .rtf file to make sure it did not have any underline attributes but unless I am missing something that does not seem to help either. 

Entire VS 2012 project issue sample... Download Project

thanks


Question: Does the function which sends a right angled triangle to its area produce infinitely many numbers having hardly any prime factors?
Answer: Presumably, there are infinitely many primes $p$, $q$, such that $p+q$ is 6 times a prime and $p-q$ is 4 times a prime (e.g., $73+5=6\times13$, $73-5=4\times17$). This ought to follow from the prime $k$-tuples conjecture. Proving it is another matter. 

Slightly simpler (but still out of reach), there should be infinitely many primes $p$, $q$, such that $2p+q$ is prime and $2p-q$ is 3 times a prime (e.g., $p=13$, $q=5$). Then the integer right-triangle with sides $4pq$ and $4p^2-q^2$ has area 6 times a product of 4 primes.

EDIT: Maybe not prime $k$-tuples but Schinzel's Hypothesis H is what's needed.