点击或拖拽改变大小

HtmlRenderRender 方法 (Graphics, String, Single, Single, Single, CssData, EventHandlerHtmlStylesheetLoadEventArgs, EventHandlerHtmlImageLoadEventArgs)

Renders the specified HTML source on the specified location and max width restriction.
Use GDI text rendering, note TextRenderingHint has no effect.
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 width and height of the rendered html.

命名空间:  DSkin.Html
程序集:  DSkin (在 DSkin.dll 中) 版本:16.6.3.22
语法
C#
public static SizeF Render(
	Graphics g,
	string html,
	float left = 0f,
	float top = 0f,
	float maxWidth = 0f,
	CssData cssData = null,
	EventHandler<HtmlStylesheetLoadEventArgs> stylesheetLoad = null,
	EventHandler<HtmlImageLoadEventArgs> imageLoad = null
)

参数

g
类型:System.DrawingGraphics
Device to render with
html
类型:SystemString
HTML source to render
left (Optional)
类型:SystemSingle
optional: the left most location to start render the html at (default - 0)
top (Optional)
类型:SystemSingle
optional: the top most location to start render the html at (default - 0)
maxWidth (Optional)
类型:SystemSingle
optional: bound the width of the html to render in (default - 0, unlimited)
cssData (Optional)
类型:DSkin.Html.CoreCssData
optional: the style to use for html rendering (default - use W3 default style)
stylesheetLoad (Optional)
类型:SystemEventHandlerHtmlStylesheetLoadEventArgs
optional: can be used to overwrite stylesheet resolution logic
imageLoad (Optional)
类型:SystemEventHandlerHtmlImageLoadEventArgs
optional: can be used to overwrite image resolution logic

返回值

类型:SizeF
the actual size of the rendered html
参见