I have a requirement to display text received in HTML format in a Winforms application. I can do this easily with the WebBrowser control, but the length of the text varies, and I need to be able to resize the control to fit the contents. The resizing is easy with a RichTextbox using the ContentsResized event, but I've yet to find a way to resize the WebBrowser effectively. A Richtextbox also makes it easy to get selected text, link clicks, etc.
I'm open to ideas. At this stage, I know of 2 options....
1) Convert HTML to RTF to display in the RichTextbox
2) Find a way to resize the WebBrowser control.
So, how can I convert HTML to RTF? Or, how can the WebBrowser control be resized to fit the contents?