HtmlRenderer.HtmlRender
Static
class for direct html rendering, intendent for small html fragments.
Prefer using WinForms Html controls: HtmlPanel or HtmlLabel.
For direct non-trivial html rendering consider using HtmlContainer.
// Measure the size (width and height) required to draw the given html under given width and height restrictions.![]()
Measure(Graphics g, string html, float maxWidth = 0, float maxHeight = 0, CssData cssData = null, object bridge = null)
// Renders the specified HTML source on the specified location and max size restriction.
// If maxWidth is zero the html will use all the required width, otherwise it will perform line wrap as specified in the html
// Returned is the actual widht and height of the rendered html.
![]()
Render(Graphics g, string html, float left = 0, float top = 0, float maxWidth = 0, CssData cssData = null, object bridge = null)
// Renders the specified HTML source on the specified location and max size restriction.
// If maxSize.Width is zero the html will use all the required width, otherwise it will perform line wrap as specified in the html
// If maxSize.Height is zero the html will use all the required height, otherwise it will clip at the given max height not rendering the html below it.
// Returned is the actual widht and height of the rendered html.
![]()
Render(Graphics g, string html, PointF location, SizeF maxSize, CssData cssData = null, object bridge = null)