HtmlContainerInt 类 |
命名空间: DSkin.Html.Core
public sealed class HtmlContainerInt
HtmlContainerInt 类型公开以下成员。
名称 | 说明 | |
---|---|---|
HtmlContainerInt(RAdapter) |
Init.
| |
HtmlContainerInt(RAdapter, RControl) |
初始化,如果需要用到鼠标等事件就需要RControl
|
名称 | 说明 | |
---|---|---|
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. | |
Control |
关联的控件
| |
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 (unwrapable 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.
| |
SelectionHandler |
名称 | 说明 | |
---|---|---|
Clear |
Clear the content of the HTML container releasing any resources used to render previously existing content.
| |
ClearSelection |
Clear the current selection.
| |
Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
| |
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.
| |
RequestRefresh |
Request invalidation and re-layout of the control hosting the renderer.
| |
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 定义。) |
MaxSize 和 ActualSize:
最大宽度和高度的呈现的 html。
最大宽度会影响自动换行的 html 布局、 调整大小的图像和表在可能的情况。
最大高度不影响布局,但不是会呈现外面 (剪辑)。
ActualSize 可以通过布局限制 (打开能线、 设置的图像大小等) 超过最大大小。
设置为零无限 (宽/高分别)。
ScrollOffset:
这将通过给定的偏移量调整呈现的 html,所以内容将"滚动"。
在与偏移量 (0,200) 的位置 (50,100) 被呈现的元素将不会呈现
在-100,因此客户端矩形外。
LinkClicked 事件
当用户点击一个链接的 html 中。
允许取消链接通过自定义逻辑来覆盖执行。
如果事件处理程序中出现的错误,它将在堆栈中向上传播。
StylesheetLoad 事件:
一个样式表时要加载的文件路径或 URL '链接' 元素中引发。
允许通过手动,提供的样式表的数据覆盖加载样式表或不同源 (文件或 URL) 从加载。
示例: href 样式表可以由预加载样式表对象的自定义逻辑解释覆盖委托中的非有效 URI 字符串
如果没有替代的数据提供将会使用原始源。
ImageLoad 事件:
提出要由 img 元素或背景图像 CSS 样式的文件路径、 URL 或内联数据加载图像时。
允许通过手动,提供的图像对象覆盖加载的图像或不同源 (文件或 URL) 从加载。
示例: 形象 src 可以解释为对资源图像对象的自定义逻辑覆盖委托中的非有效字符串
示例: 形象在 html 中的 src 是相对的 — — 覆盖截获负荷,并提供完整的源代码的 URL 加载图像从
示例: 映像下载文件要求身份验证-覆盖拦截负载,下载图像到磁盘使用自定义代码,并提供
加载的图像的文件路径。
如果没有替代的数据提供将会使用原始源。
Refresh 事件:
当 html 渲染器需要刷新的承载 (失效和重新布局) 的控件引发。
不能保证会在主线程上引发该事件,它可以在线程池线程上引发。
RenderError 事件:
当 html 渲染的过程中出错时引发。