HtmlContainer 类 |
命名空间: DSkin.Html
public sealed class HtmlContainer
HtmlContainer 类型公开以下成员。
名称 | 说明 | |
---|---|---|
HtmlContainer |
Init.
| |
HtmlContainer(Object) |
Init.
|
名称 | 说明 | |
---|---|---|
ActualSize |
The actual size of the rendered html (after layout)
| |
AvoidAsyncImagesLoading |
Gets or sets a value indicating if image asynchronous loading should be avoided (default - false). True - images are loaded synchronously during html parsing. False - images are loaded asynchronously to html parsing when downloaded from URL or loaded from disk. | |
AvoidGeometryAntialias |
Gets or sets a value indicating if anti-aliasing should be avoided for geometry like backgrounds and borders (default - false).
| |
AvoidImagesLateLoading |
Gets or sets a value indicating if image loading only when visible should be avoided (default - false). True - images are loaded as soon as the html is parsed. False - images that are not visible because of scroll location are not loaded until they are scrolled to. | |
CssData |
the parsed stylesheet data used for handling the html
| |
IsContextMenuEnabled |
Is the build-in context menu enabled and will be shown on mouse right click (default - true)
| |
IsSelectionEnabled |
Is content selection is enabled for the rendered html (default - true). If set to 'false' the rendered html will be static only with ability to click on links. | |
Location |
The top-left most location of the rendered html. This will offset the top-left corner of the rendered html. | |
MaxSize |
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). | |
Root |
根元素
| |
ScrollOffset |
The scroll offset of the html. This will adjust the rendered html by the given offset so the content will be "scrolled". | |
SelectedHtml |
Copy the currently selected html segment with style.
| |
SelectedText |
Get the currently selected text segment in the html.
|
名称 | 说明 | |
---|---|---|
ClearSelection |
Clear the current selection.
| |
CopySelectedHtml |
复制被选中的HTML内容
| |
Dispose | 释放被 HtmlContainer 使用的所有资源 | |
GetAttributeAt |
Get attribute value of element at the given x,y location by given key. If more than one element exist with the attribute at the location the inner most is returned. | |
GetElementRectangle |
Get the rectangle of html element as calculated by html layout. Element if found by id (id attribute on the html element). Note: to get the screen rectangle you need to adjust by the hosting control. | |
GetHtml |
Get html from the current DOM tree with style if requested.
| |
GetLinkAt |
Get css link href at the given x,y location.
| |
GetLinks |
Get all the links in the HTML with the element rectangle and href data.
| |
HandleKeyDown |
Handle key down event for selection and copy.
| |
HandleMouseDoubleClick |
Handle mouse double click to select word under the mouse.
| |
HandleMouseDown |
Handle mouse down to handle selection.
| |
HandleMouseEnter | ||
HandleMouseLeave |
Handle mouse leave to handle hover cursor.
| |
HandleMouseMove |
Handle mouse move to handle hover cursor and text selection.
| |
HandleMouseUp |
Handle mouse up to handle selection and link click.
| |
PerformLayout |
Measures the bounds of box and children, recursively.
| |
PerformPaint |
Render the html using the given device.
| |
SelectAll |
全选
| |
SetHtml |
Init with optional document and stylesheet.
|
名称 | 说明 | |
---|---|---|
ImageLoad |
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. | |
LinkClicked |
Raised when the user clicks on a link in the html. Allows canceling the execution of the link. | |
LoadComplete |
Raised when the set html document has been fully loaded. Allows manipulation of the html dom, scroll position, etc. | |
Refresh |
Raised when html renderer requires refresh of the control hosting (invalidation and re-layout).
| |
RenderError |
Raised when an error occurred during html rendering. | |
ScrollChange |
Raised when Html Renderer request scroll to specific location. This can occur on document anchor click. | |
StylesheetLoad |
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. |
名称 | 说明 | |
---|---|---|
FormatDateTime |
将数据以时间格式并对其格式化
(由 ObjectExtenstions 定义。) | |
FormatNumber |
将数据以数值方式对数据格式化
(由 ObjectExtenstions 定义。) | |
FormatString |
将数据以字符串格式对数据格式化
(由 ObjectExtenstions 定义。) | |
Sleep |
异步延迟执行代码,只能在主线程中调用
(由 DuiControlExtensions 定义。) | |
ToBool |
将数据转换成Bool,如果转换失败返回False
(由 ObjectExtenstions 定义。) | |
ToDateTime |
将数据转换成DateTime,如果转换失败返回空的时间
(由 ObjectExtenstions 定义。) | |
ToDouble |
将数据转换成Double,如果转换失败返回0
(由 ObjectExtenstions 定义。) | |
ToEnumT |
将数据转换成枚举,如果转换失败则返回默认值
(由 ObjectExtenstions 定义。) | |
ToFloat |
将数据转换成Float,如果转换失败返回0
(由 ObjectExtenstions 定义。) | |
ToInt | 已重载。
将数据转换成int,如果转换失败返回0
(由 ObjectExtenstions 定义。) | |
ToInt(Int32) | 已重载。
数据转换成int,如果转换失败,返回errorResult
(由 ObjectExtenstions 定义。) | |
ToJson |
将对象序列化成Json字符串
(由 JsonHelper 定义。) | |
ToLong |
将数据转换成Long,如果转换失败返回0
(由 ObjectExtenstions 定义。) |