Namespace TheArtOfDev.HtmlRenderer.Core.Entities
Classes
- CssBlock
Represents a block of CSS property values.
Contains collection of key-value pairs that are CSS properties for specific css class.
Css class can be either custom or html tag name.
- HtmlImageLoadEventArgs
Invoked when an image is about to be loaded by file path, URL or inline data in 'img' element or background-image CSS style.
Allows to overwrite the loaded image by providing the image object manually, or different source (file or URL) to load from.
Example: image 'src' can be non-valid string that is interpreted in the overwrite delegate by custom logic to resource image object
Example: image 'src' in the html is relative - the overwrite intercepts the load and provide full source URL to load the image from
Example: image download requires authentication - the overwrite intercepts the load, downloads the image to disk using custom code and provide file path to load the image from. Can also use the asynchronous image overwrite not to block HTML rendering is applicable.
If no alternative data is provided the original source will be used.
- HtmlLinkClickedEventArgs
Raised when the user clicks on a link in the html.
- HtmlLinkClickedException
Exception thrown when client code subscribed to LinkClicked event thrown exception.
- HtmlRefreshEventArgs
Raised when html renderer requires refresh of the control hosting (invalidation and re-layout).
It can happen if some async event has occurred that requires re-paint and re-layout of the html.
Example: async download of image is complete.
- HtmlRenderErrorEventArgs
Raised when an error occurred during html rendering.
- HtmlScrollEventArgs
Raised when Html Renderer request scroll to specific location.
This can occur on document anchor click.
- HtmlStylesheetLoadEventArgs
Invoked when a stylesheet is about to be loaded by file path or URL in 'link' element.
Allows to overwrite the loaded stylesheet by providing the stylesheet data manually, or different source (file or URL) to load from.
Example: The stylesheet 'href' can be non-valid URI string that is interpreted in the overwrite delegate by custom logic to pre-loaded stylesheet object
If no alternative data is provided the original source will be used.
- LinkElementData<T>
Holds data on link element in HTML.
Used to expose data outside of HTML Renderer internal structure.
Structs
- CssBlockSelectorItem
Holds single class selector in css block hierarchical selection (p class1 > div.class2)
Enums
- HtmlGenerationStyle
Controls the way styles are generated when html is generated.
- HtmlRenderErrorType
Enum of possible error types that can be reported.
Delegates
- HtmlImageLoadCallback
Callback used in HtmlImageLoadEventArgs to allow setting image externally and async.
The callback can provide path to image file path, URL or the actual image to use.
IfimageRectangle
is given (not Empty) then only the specified rectangle will be used from the loaded image and not all of it, also the rectangle will be used for size and not the actual image size.