HtmlContainer Class

HtmlRenderer.HtmlContainer

Low level handling of Html Renderer logic, this class is used by HtmlPanel, HtmlLabel, HtmlToolTip and HtmlRender.
The class allows html layout and rendering without association to actual winforms control, thouse allowing to handle html rendering on any graphics object.
Using this class will require the client to handle all propogation of mouse\keyboard events, layout/paint calls, scrolling offset and location/size/rectangle handling and UI refresh requests.

Properties

Methods

Events

Remarks

MaxSize and ActualSize

The max width and height of the rendered html.
The max width will effect the html layout wrapping lines, resize images and tables where possible.
The max height does NOT effect layout, but will not render outside it (clip).
ActualSize can be exceed the max size by layout restrictions (unwrappable line, set image size, etc.).
Set zero for unlimited (width\height separately).

ScrollOffset

This will adjust the rendered html by the given offset so the content will be "scrolled".
Element that is rendered at location (50,100) with offset of (0,200) will not be rendered as it will be at -100 therefore outside the client rectangle of the control.

LinkClicked event

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

StylesheetLoad event

Raised when aa 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.

Refresh event

Raised when html renderer requires refresh of the control hosting (invalidation and re-layout).
There is no garantie that the event will be raised on the main thread, it can be raised on threadpool thread.

RenderError event

Raised when an error occured during html rendering.