Table of Contents

Namespace TheArtOfDev.HtmlRenderer.WPF

Classes

HtmlContainer

Low level handling of Html Renderer logic, this class is used by HtmlParser, HtmlLabel and HtmlRender.

HtmlControl

Provides HTML rendering using the text property.
WPF control that will render html content in it's client rectangle.
The control will handle mouse and keyboard events on it to support html text selection, copy-paste and mouse clicks.

The major differential to use HtmlPanel or HtmlLabel is size and scrollbars.
If the size of the control depends on the html content the HtmlLabel should be used.
If the size is set by some kind of layout then HtmlPanel is more suitable, also shows scrollbars if the html contents is larger than the control client rectangle.

LinkClicked event:

Raised when the user clicks on a link in the html.
Allows canceling the execution of the link.

StylesheetLoad event:

Raised when a stylesheet is about to be loaded by file path or URI by link element.
This event allows to provide the stylesheet manually or provide new source (file or uri) to load from.
If no alternative data is provided the original source will be used.

ImageLoad event:

Raised when an image is about to be loaded by file path or URI.
This event allows to provide the image manually, if not handled the image will be loaded from file or download from URI.

RenderError event:

Raised when an error occurred during html rendering.
HtmlLabel

Provides HTML rendering using the text property.
WPF control that will render html content in it's client rectangle.
Using AutoSize and AutoSizeHeightOnly client can control how the html content effects the size of the label. Either case scrollbars are never shown and html content outside of client bounds will be clipped. MaxWidth/MaxHeight and MinWidth/MinHeight with AutoSize can limit the max/min size of the control
The control will handle mouse and keyboard events on it to support html text selection, copy-paste and mouse clicks.

HtmlPanel

Provides HTML rendering using the text property.
WPF control that will render html content in it's client rectangle.
If the layout of the html resulted in its content beyond the client bounds of the panel it will show scrollbars (horizontal/vertical) allowing to scroll the content.
The control will handle mouse and keyboard events on it to support html text selection, copy-paste and mouse clicks.

HtmlRender

Standalone static class for simple and direct HTML rendering.
For WPF UI prefer using HTML controls: HtmlPanel or HtmlLabel.
For low-level control and performance consider using HtmlContainer.

RoutedEventArgs<T>

HTML Renderer routed event arguments containing event data.

Delegates

RoutedEventHandler<T>

Handler for HTML renderer routed events.