CssBoxFrame

TheArtOfDev.HtmlRenderer.Core.Dom

CSS box for iframe element. If the iframe is of embedded YouTube or Vimeo video it will show image with play.

継承元: CssBox

コンストラクター

CssBoxFrame(CssBox, HtmlTag)

Init.

parent
the parent box of this box
tag
the html tag data of this box

プロパティ

IsClickable : bool

Is the css box clickable ("a" element is clickable)

IsVideo : bool

is the iframe is of embeded video

メソッド

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

DrawImage(RGraphics, RPoint, RRect)

Draw video image over the iframe if found.

DrawPlay(RGraphics, RRect)

Draw play over the iframe if we found link url.

DrawTitle(RGraphics, RRect)

Draw video title on top of the iframe if found.

HandleDataLoadFailure(Exception, string)

Handle error occurred during video data load to handle if the video was not found.

ex
the exception that occurred during data load web request
source
the name of the video source (YouTube/Vimeo/Etc.)
HandlePostApiCall()

Create image handler for downloading video image if found and release the WebClient instance used for API call.

LoadVimeoDataAsync(Uri)

Load Vimeo video data (title, image, link) by calling Vimeo API.

MeasureWordsSize(RGraphics)

Assigns words its width and height

g
the device to use
OnDownloadVimeoApiCompleted(string)

Parse Vimeo API response to get video data (title, image, link).

OnLoadImageComplete(RImage, RRect, bool)

On image load process is complete with image or without update the image box.

image
the image loaded or null if failed
rectangle
the source rectangle to draw in the image (empty - draw everything)
refresh
is the callback was called async to load image call
PaintImp(RGraphics)

Paints the fragment

g
the device to draw to
SetErrorBorder()

Set error image border on the image box.

フィールド

_imageLoadHandler : ImageLoadHandler

handler used for image loading by source

_imageLoadingComplete : bool

is image load is finished, used to know if no image is found

_imageWord : CssRectImage

the image word of this image box

_isVideo : bool

is the iframe is of embeded video

_videoImageUrl : string

the url of the video thumbnail image

_videoLinkUrl : string

link to the video on the site

_videoTitle : string

the title of the video