The rich formatting power of HTML in your .NET applications using simple controls or static rendering code.
The library is 100% managed C# code without any external dependencies (no WebBrowser control, ActiveX / COM or MSHTML dll), the only requirement is .NET 2.0 or higher.
![Renderer1.png Renderer1.png]()
![NuGet package NuGet package]()
The library is 100% managed C# code without any external dependencies (no WebBrowser control, ActiveX / COM or MSHTML dll), the only requirement is .NET 2.0 or higher.
- Download the Demo application to explore HTML Renderer capabilities.
- See Image generation for how-to generate image from HTML.
Features and Benefits
- Extensive HTML 4.01 and CSS level 2 specifications support.
- Support separating CSS from HTML by loading stylesheet code separately.
- Support text selection, copy-paste and context menu.
- WinForms controls: HtmlPanel, HtmlLabel and HtmlToolTip.
- Create images from HTML snippets.
- Handles "real world" malformed HTML, it doesn't have to be XHTML.
- 100% managed code and no external dependencies.
- Supports .NET 2.0 or higher including Client Profile.
- Lightweight single dll (~250K).
- High performance and low memory footprint.
- Extendable and configurable.
- Powerful Demo application to explore and learn the library.
WinForms controls
- HtmlPanel - The full power of HTML control build to replace WinForms WebBrowser control, accepts HTML, text selection, scrollbars, link click intercept, image load intercept and much more.
- HtmlLabel - As WinForms label but accepts HTML, text selection, auto-size capabilities, transparent background and more.
- HtmlToolTip - As WinForms ToolTip control but accepts HTML and ability to handle links.
Sample application
- Render HTML content generated by rich web editors like forums, blogs, etc.
- Render Office documents converted to HTML.
- Create complex WinForms UI with HTML instead of numerous WinForms controls with complex layout logic.
- Create WinForms UI that requires text selection with clipboard support.
- Create images from HTML code snippets.
NuGet package install
Manual install
- Download the binaries.
- Reference the proper .NET release (2.0, 3.5, 4.0, 4.5) in your project.
Usage
- Add HtmlRenderer to Visual Studio Toolbox (drag-drop the dll on it).
- Drag-n-drop HtmlPanel, HtmlLabel or HtmlToolTip from the Toolbox.
- Set the Text property with your HTML.
Source
- ArthurHub/HTML-Renderer on GitHub
Authors
- Arthur Teplitzki - http://TheArtOfDev.wordpress.com
- Jose Manuel Menendez Poo - www.menendezpoo.com