0

I am trying to find out a control that will parse HTML in C#. It should display background colors, and everything else.

I have tried a couple of controls:

Web Browser - Does NOT display the background color.

RichTextBox - Does NOT display HTML, it only shows the HTML code for example:

<HTML>
    <BODY>
        <FONT COLOR="#123456">
            HELLO
        </FONT>
    </BODY>
</HTML>

How would I get C# to parse the ENTIRE HTML contents, including the background color whether it changes every 30 seconds or not?

Maybe an HTML to RTF converted for the richtextbox control? And if so, how would I convert it?

3
  • BACK isn't a valid html tag as far as I know, so good luck getting that to show. Commented May 6, 2011 at 4:40
  • 1
    Only 2 answers accepted so far ! Commented May 6, 2011 at 4:41
  • 1
    Lose the <FONT> tag. Seriously. This is the 21st century now. Commented May 6, 2011 at 16:33

3 Answers 3

2

The WebBrowser control is quite literally the exactly same engine (Trident) as IE, so I question it when you say that it will not display background colors. The example you show above has no background color specified.

That being said, WPF Page controls can display HTML just as though you where using a browser, given the correct configuration options. You would convert a normal Window to a NavigationWindow and then Navigate() to the URI in question.

Sign up to request clarification or add additional context in comments.

Comments

0

Start from the rich textbox and save the file as htm/html.

Comments

0

You can convert HTML to rtf and set it as Rtf Property. It is lot of work and you should do it only when you want to edit your HTML.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.