Reputation: 41
I have a bunch of HTML code that I need to display in a label/textbox in a windows app written in c#. It should be in such a way that the output shows the HTML formatted text, rather than the HTML code itself.
How can I do this?
Upvotes: 4
Views: 8563
Reputation: 11342
If WebBrowser doesn't suit your needs you can check out these libraries with HTML label/control support
Telerik Controls for WinForms (Not Free) http://www.telerik.com/products/winforms.aspx
GDI+ HTMLRenderer (Free, Open Source)
http://www.codeproject.com/KB/GDI-plus/HtmlRenderer.aspx?msg=2934040
Upvotes: 1
Reputation: 6686
Render your HTML in WebBrowser control. It has special events for document and you can iterate by tags like this Hope it will help you;)
Upvotes: 3
Reputation: 8334
The HTML Editor (a wrapper for MSHTML, the rendering portion of Internet Explorer) in read-only mode might be what you need.
Upvotes: 0
Reputation: 36487
There's a web browser control using IE's rendering engine to display HTML content. You might as well be able to do some simple parsing yourself and use a RTF control but that way you will be rather restricted.
Upvotes: 1