CssLength

TheArtOfDev.HtmlRenderer.Core.Dom

Represents and gets info about a CSS Length

コンストラクター

CssLength(string)

Creates a new CssLength from a length specified on a CSS style sheet or fragment

length
Length as specified in the Style Sheet or style fragment

プロパティ

HasError : bool

Gets if the length has some parsing error

IsPercentage : bool

Gets if the length represents a precentage (not actually a length)

IsRelative : bool

Gets if the length is specified in relative units

Length : string

Gets the length as specified in the string

Number : double

Gets the number in the length

Unit : CssUnit

Gets the unit of the length

メソッド

ConvertEmToPixels(double) : CssLength

If length is in Ems, returns its value in pixels

pixelFactor
Pixel size factor to multiply

戻り値: Pixels size of this em

ConvertEmToPoints(double) : CssLength

If length is in Ems, returns its value in points

emSize
Em size factor to multiply

戻り値: Points size of this em

ToString() : string

Returns the length formatted ready for CSS interpreting.