点击或拖拽改变大小

CssBox 类

Represents a CSS Box of text or replaced elements.
继承层次

命名空间:  DSkin.Html.Core.Dom
程序集:  DSkin (在 DSkin.dll 中) 版本:16.6.3.22
语法
C#
public class CssBox : CssBoxProperties, IEnumerable

CssBox 类型公开以下成员。

构造函数
  名称说明
公共方法CssBox
Init.
Top
属性
  名称说明
公共属性ActualBackgroundColor
Gets the actual background color of the box
(继承自 CssBoxProperties。)
公共属性ActualBackgroundGradient
Gets the second color that creates a gradient for the background
(继承自 CssBoxProperties。)
公共属性ActualBackgroundGradientAngle
Gets the actual angle specified for the background gradient
(继承自 CssBoxProperties。)
公共属性ActualBorderBottomColor
Gets the actual Bottom border Color
(继承自 CssBoxProperties。)
公共属性ActualBorderBottomWidth
Gets the actual Bottom border width
(继承自 CssBoxProperties。)
公共属性ActualBorderLeftColor
Gets the actual Left border Color
(继承自 CssBoxProperties。)
公共属性ActualBorderLeftWidth
Gets the actual Left border width
(继承自 CssBoxProperties。)
公共属性ActualBorderRightColor
Gets the actual Right border Color
(继承自 CssBoxProperties。)
公共属性ActualBorderRightWidth
Gets the actual Right border width
(继承自 CssBoxProperties。)
公共属性ActualBorderSpacingHorizontal
Gets the actual horizontal border spacing for tables
(继承自 CssBoxProperties。)
公共属性ActualBorderSpacingVertical
Gets the actual vertical border spacing for tables
(继承自 CssBoxProperties。)
公共属性ActualBorderTopColor
Gets the actual top border Color
(继承自 CssBoxProperties。)
公共属性ActualBorderTopWidth
Gets the actual top border width
(继承自 CssBoxProperties。)
公共属性ActualBottom
Gets or sets the bottom of the box. (When setting, alters only the Size.Height of the box)
(继承自 CssBoxProperties。)
公共属性ActualColor
获取实际的文本的颜色。
(继承自 CssBoxProperties。)
公共属性ActualCornerNe
Gets the actual length of the north east corner
(继承自 CssBoxProperties。)
公共属性ActualCornerNw
Gets the actual length of the north west corner
(继承自 CssBoxProperties。)
公共属性ActualCornerSe
Gets the actual length of the south east corner
(继承自 CssBoxProperties。)
公共属性ActualCornerSw
Gets the actual length of the south west corner
(继承自 CssBoxProperties。)
公共属性ActualFont
Gets the font that should be actually used to paint the text of the box
(继承自 CssBoxProperties。)
公共属性ActualHeight
Gets the actual height
(继承自 CssBoxProperties。)
公共属性ActualLineHeight
Gets the line height
(继承自 CssBoxProperties。)
公共属性ActualMarginBottom
Gets the actual Margin of the bottom
(继承自 CssBoxProperties。)
公共属性ActualMarginLeft
Gets the actual Margin on the left
(继承自 CssBoxProperties。)
公共属性ActualMarginRight
Gets the actual Margin on the right
(继承自 CssBoxProperties。)
公共属性ActualMarginTop
Gets the actual top's Margin
(继承自 CssBoxProperties。)
公共属性ActualPaddingBottom
Gets the actual Padding of the bottom
(继承自 CssBoxProperties。)
公共属性ActualPaddingLeft
Gets the actual padding on the left
(继承自 CssBoxProperties。)
公共属性ActualPaddingRight
Gets the actual padding on the right
(继承自 CssBoxProperties。)
公共属性ActualPaddingTop
Gets the actual top's padding
(继承自 CssBoxProperties。)
公共属性ActualParentFont
Gets the actual font of the parent
(继承自 CssBoxProperties。)
公共属性ActualRight
Gets the right of the box. When setting, it will affect only the width of the box.
(继承自 CssBoxProperties。)
公共属性ActualTextIndent
Gets the text indentation (on first line only)
(继承自 CssBoxProperties。)
公共属性ActualWidth
Gets the actual height
(继承自 CssBoxProperties。)
公共属性ActualWordSpacing
Gets the actual width of whitespace between words.
(继承自 CssBoxProperties。)
公共属性AvailableWidth
Gets the width available on the box, counting padding and margin.
(继承自 CssBoxProperties。)
公共属性BackgroundColor (继承自 CssBoxProperties。)
公共属性BackgroundGradient (继承自 CssBoxProperties。)
公共属性BackgroundGradientAngle (继承自 CssBoxProperties。)
公共属性BackgroundImage (继承自 CssBoxProperties。)
公共属性BackgroundPosition (继承自 CssBoxProperties。)
公共属性BackgroundRepeat (继承自 CssBoxProperties。)
公共属性BorderBottomColor (继承自 CssBoxProperties。)
公共属性BorderBottomStyle (继承自 CssBoxProperties。)
公共属性BorderBottomWidth (继承自 CssBoxProperties。)
公共属性BorderCollapse (继承自 CssBoxProperties。)
公共属性BorderLeftColor (继承自 CssBoxProperties。)
公共属性BorderLeftStyle (继承自 CssBoxProperties。)
公共属性BorderLeftWidth (继承自 CssBoxProperties。)
公共属性BorderRightColor (继承自 CssBoxProperties。)
公共属性BorderRightStyle (继承自 CssBoxProperties。)
公共属性BorderRightWidth (继承自 CssBoxProperties。)
公共属性BorderSpacing (继承自 CssBoxProperties。)
公共属性BorderTopColor (继承自 CssBoxProperties。)
公共属性BorderTopStyle (继承自 CssBoxProperties。)
公共属性BorderTopWidth (继承自 CssBoxProperties。)
公共属性Bounds
Gets the bounds of the box
(继承自 CssBoxProperties。)
公共属性Boxes
Gets the children boxes of this box
公共属性ClientBottom
Gets the bottom of the client rectangle
(继承自 CssBoxProperties。)
公共属性ClientLeft
Gets the left of the client rectangle (Where content starts rendering)
(继承自 CssBoxProperties。)
公共属性ClientRectangle
Gets the client rectangle
(继承自 CssBoxProperties。)
公共属性ClientRight
Gets the right of the client rectangle
(继承自 CssBoxProperties。)
公共属性ClientTop
Gets the top of the client rectangle (Where content starts rendering)
(继承自 CssBoxProperties。)
公共属性CollapsedMarginTop
The margin top value if was effected by margin collapse.
(继承自 CssBoxProperties。)
公共属性Color (继承自 CssBoxProperties。)
公共属性ContainingBlock
Gets the containing block-box of this box. (The nearest parent box with display=block)
公共属性CornerNeRadius (继承自 CssBoxProperties。)
公共属性CornerNwRadius (继承自 CssBoxProperties。)
公共属性CornerRadius (继承自 CssBoxProperties。)
公共属性CornerSeRadius (继承自 CssBoxProperties。)
公共属性CornerSwRadius (继承自 CssBoxProperties。)
公共属性Direction (继承自 CssBoxProperties。)
公共属性Display (继承自 CssBoxProperties。)
公共属性EmptyCells (继承自 CssBoxProperties。)
公共属性FirstHostingLineBox
Gets or sets the first linebox where content of this box appear
公共属性FirstWord
Gets the first word of the box
公共属性Float (继承自 CssBoxProperties。)
公共属性FontFamily (继承自 CssBoxProperties。)
公共属性FontSize (继承自 CssBoxProperties。)
公共属性FontStyle (继承自 CssBoxProperties。)
公共属性FontVariant (继承自 CssBoxProperties。)
公共属性FontWeight (继承自 CssBoxProperties。)
公共属性Height (继承自 CssBoxProperties。)
公共属性HrefLink
Get the href link of the box (by default get "href" attribute)
公共属性HtmlContainer
Gets the HtmlContainer of the Box. WARNING: May be null.
公共属性HtmlTag
Gets the HTMLTag that hosts this box
公共属性InnerText
获取内部所有文本
公共属性IsBlock
is the box "Display" is "Block", is this is an block box and not inline.
公共属性IsBrElement
Is the box is of "br" element.
公共属性IsClickable
Is the css box clickable (by default only "a" element is clickable)
公共属性IsImage
Gets if this box represents an image
公共属性IsInline
is the box "Display" is "Inline", is this is an inline box and not block.
公共属性IsRounded
Gets a value indicating if at least one of the corners of the box is rounded
(继承自 CssBoxProperties。)
公共属性IsSpaceOrEmpty
Tells if the box is empty or contains just blank spaces
公共属性LastHostingLineBox
Gets or sets the last linebox where content of this box appear
公共属性Left (继承自 CssBoxProperties。)
公共属性LineBoxes
Gets the line-boxes of this box (if block box)
公共属性LineHeight (继承自 CssBoxProperties。)
公共属性ListStyle (继承自 CssBoxProperties。)
公共属性ListStyleImage (继承自 CssBoxProperties。)
公共属性ListStylePosition (继承自 CssBoxProperties。)
公共属性ListStyleType (继承自 CssBoxProperties。)
公共属性Location
Gets or sets the location of the box
(继承自 CssBoxProperties。)
公共属性MarginBottom (继承自 CssBoxProperties。)
公共属性MarginLeft (继承自 CssBoxProperties。)
公共属性MarginRight (继承自 CssBoxProperties。)
公共属性MarginTop (继承自 CssBoxProperties。)
公共属性MaxWidth (继承自 CssBoxProperties。)
公共属性Overflow (继承自 CssBoxProperties。)
公共属性PaddingBottom (继承自 CssBoxProperties。)
公共属性PaddingLeft (继承自 CssBoxProperties。)
公共属性PaddingRight (继承自 CssBoxProperties。)
公共属性PaddingTop (继承自 CssBoxProperties。)
公共属性ParentBox
Gets or sets the parent box of this box
公共属性ParentLineBoxes
Gets the linebox(es) that contains words of this box (if inline)
公共属性Position (继承自 CssBoxProperties。)
公共属性Rectangles
Gets the rectangles where this box should be painted
公共属性Size
Gets or sets the size of the box
(继承自 CssBoxProperties。)
公共属性TagName
标签名
公共属性Text
Gets or sets the inner text of the box
公共属性TextAlign (继承自 CssBoxProperties。)
公共属性TextDecoration (继承自 CssBoxProperties。)
公共属性TextIndent (继承自 CssBoxProperties。)
公共属性Top (继承自 CssBoxProperties。)
公共属性VerticalAlign (继承自 CssBoxProperties。)
公共属性Visibility (继承自 CssBoxProperties。)
公共属性WhiteSpace (继承自 CssBoxProperties。)
公共属性Width (继承自 CssBoxProperties。)
公共属性WordBreak (继承自 CssBoxProperties。)
公共属性Words
Gets the BoxWords of text in the box
公共属性WordSpacing (继承自 CssBoxProperties。)
Top
方法
  名称说明
公共方法静态成员CreateBlock
Create new css block box.
公共方法静态成员CreateBlock(CssBox, HtmlTag, CssBox)
Create new css block box for the given parent with the given optional html tag and insert it either at the end or before the given optional box.
If no html tag is given the box will be anonymous.
If no before box is given the new box will be added at the end of parent boxes collection.
If before box doesn't exists in parent box exception is thrown.
公共方法静态成员CreateBox(HtmlTag, CssBox)
Create new css box for the given parent with the given html tag.
公共方法静态成员CreateBox(CssBox, HtmlTag, CssBox)
Create new css box for the given parent with the given optional html tag and insert it either at the end or before the given optional box.
If no html tag is given the box will be anonymous.
If no before box is given the new box will be added at the end of parent boxes collection.
If before box doesn't exists in parent box exception is thrown.
公共方法Dispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
受保护的方法GetActualColor (重写 CssBoxPropertiesGetActualColor(String).)
公共方法GetAttribute(String)
获取指定的属性,则返回的s属性值字符串。如果没有指定的属性,则返回空字符串
公共方法GetAttribute(String, String)
获取 HTML 标记源的指定属性的值。
受保护的方法GetCachedFont (重写 CssBoxPropertiesGetCachedFont(String, Double, RFontStyle).)
公共方法GetEmHeight
Gets the height of the font in the specified units
(继承自 CssBoxProperties。)
公共方法GetEnumerator
受保护的方法GetParent
Get the parent of this css properties instance.
(重写 CssBoxPropertiesGetParent.)
受保护的方法GetSelectionBackBrush
Get brush for selection background depending if it has external and if alpha is required for images.
受保护的方法GetSelectionForeBrush
Get brush for the text depending if there is selected text color set.
受保护的方法InheritStyle
Inherits inheritable values from specified box.从指定的框继承可继承的值。
(继承自 CssBoxProperties。)
受保护的方法MarginTopCollapse
Gets the result of collapsing the vertical margins of the two boxes
受保护的方法MeasureWordSpacing
Measures the width of whitespace between words (set ActualWordSpacing).
(继承自 CssBoxProperties。)
受保护的方法NoEms
Ensures that the specified length is converted to pixels if necessary
(继承自 CssBoxProperties。)
受保护的方法OnMouseDoubleClick
受保护的方法OnMouseDown
受保护的方法OnMouseEnter
受保护的方法OnMouseLeave
受保护的方法OnMouseMove
受保护的方法OnMouseUp
公共方法Paint
Paints the fragment
受保护的方法PaintBackground
Paints the background of the box
受保护的方法PaintDecoration
Paints the text decoration (underline/strike-through/over-line)
受保护的方法PaintImp
Paints the fragment
公共方法ParseToWords
Splits the text into words and saves the result 将文本拆分为词并保存结果
公共方法PerformLayout
Measures the bounds of box and children, recursively.
Performs layout of the DOM structure creating lines by set bounds restrictions.
受保护的方法PerformLayoutImp
Measures the bounds of box and children, recursively.
Performs layout of the DOM structure creating lines by set bounds restrictions.
公共方法Query
查询DOM元素
受保护的方法SetAllBorders
Set the style/width/color for all 4 borders on the box.
if null is given for a value it will not be set.
(继承自 CssBoxProperties。)
公共方法SetAllBoxes
Move all child boxes from fromBox to this box.
公共方法SetBeforeBox
Set this box in
公共方法SetInlineStyle
设置内联样式 比如 color: red;
公共方法ToString
ToString override.
(重写 ObjectToString.)
Top
事件
字段
  名称说明
受保护的字段_htmlContainer
the root container for the hierarchy
受保护的字段_wordsSizeMeasured
Top
扩展方法
  名称说明
公共扩展器方法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 定义。)
Top
备注
The Box can contains other boxes, that's the way that the CSS Tree is composed. To know more about boxes visit CSS spec: http://www.w3.org/TR/CSS21/box.html
参见