forum

Home / DeveloperSection / Forums / WPF RichTextBox Image Link issue

WPF RichTextBox Image Link issue

Anonymous User 2456 23-Sep-2013

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.


wpf wpf 
Updated on 23-Sep-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By