Represents MathElement.style, a likely upcoming API. It hosts the computed style amongst other things.
Represents SVGElement.style, a likely upcoming API. It hosts the computed style amongst other things.
The .style property of a html element.
Represents SpeechElement.style. It hosts the computed style amongst other things.
Public Member Functions | |
ElementStyle (Dom.Element element) | |
Creates a new element style for the given element. More... | |
override void | OnChanged (CssProperty property, Value newValue) |
called when the named property changes. More... | |
ComputedStyle | getComputedStyle () |
JS API function for getting the computed style. More... | |
override ComputedStyle | GetComputed () |
Gets the computed form of this style. More... | |
override string | GetString (string property) |
Gets the given property as a css string. May optionally read the given inner index of it as a css string. More... | |
Public Member Functions inherited from Css.Style | |
Style (Node element) | |
Creates a new style for the given element. More... | |
Style (string text, Node element) | |
Creates a new style with the given css text string seperated by semicolons. More... | |
Style | Clone () |
Clone this style object. More... | |
string | getPropertyValue (string property) |
JS API for getting property values. In PowerUI you can just use this[property] instead. More... | |
void | CopyTo (Style otherStyle, StyleCopyMode mode) |
Copies this objects properties to the other given style, overwriting existing properties if told to do so. More... | |
void | LoadProperties (CssLexer lexer, OnReadProperty onPropertyRead) |
Reads the properties for this style block from the lexer. Essentially treats it like a set of properties only. Terminated by }, null or >. More... | |
Value | Get (string cssProperty) |
Gets the value of the given property, if any. More... | |
void | CallChange (CssProperty property, Value value) |
Lets the sheet know that a value changed. Non-alias values here only. More... | |
Css.Value | Set (string cssProperty, string valueText) |
Sets the named property on this style to the given value. More... | |
void | SetComposite (string cssProperty, Css.Value newValue, Css.Value composite) |
Sets a property from a composite set. Any new values that are null are set to the initial value and inherit the specifity from the composite value. More... | |
override string | ToString () |
Public Attributes | |
ComputedStyle | Computed |
The computed style of this element. More... | |
Public Attributes inherited from Css.Style | |
Node | Element |
The element that this style belongs to, if any. More... | |
Dictionary< CssProperty, Value > | Properties =new Dictionary<CssProperty,Value>() |
The mapping of css property (e.g. display) to value ("none" as a Css.Value). Do not set values directly into this - use style[property]=value; instead to correctly handle aliases. More... | |
Properties | |
string | scriptMinSize [get, set] |
-spark-script-min-size. More... | |
string | scriptLevel [get, set] |
-spark-script-level. More... | |
string | slides [get, set] |
The PowerSlide CSS property. Works just like "animation" does. More... | |
string | voice [get, set] |
The voice in use. More... | |
string | borderTopLeftRadius [get, set] |
Sets the top left border radius. More... | |
string | borderTopRightRadius [get, set] |
Sets the top right border radius. More... | |
string | borderBottomRightRadius [get, set] |
Sets the bottom right border radius. More... | |
string | borderBottomLeftRadius [get, set] |
Sets the bottom left border radius. More... | |
string | borderRadius [get, set] |
Sets the border radius of all corners. More... | |
string | animation [get, set] |
CSS animation. More... | |
string | scrollLeft [get, set] |
Sets the left scroll offset. More... | |
string | scrollTop [get, set] |
Sets the top scroll offset. More... | |
string | minHeight [get, set] |
The minimum height for this element. Default is 0px. More... | |
string | minWidth [get, set] |
The minimum width for this element. Default is 0px. More... | |
string | maxHeight [get, set] |
The maximum height for this element. More... | |
string | maxWidth [get, set] |
The maximum width for this element. More... | |
string | textClip [get, set] |
How scrolling text gets clipped. By default this is "fast" and makes text look like it is being squished. "fast" or "clip". More... | |
string | background [get, set] |
A shortcut for applying an image, solid colour and the repeat setting all at once. E.g. "url(myImage.png) repeat-x #000000". More... | |
string | backgroundAttachment [get, set] |
background-attachment. More... | |
string | backgroundColor [get, set] |
The colour of a solid background. E.g. "#ffffff". More... | |
string | backgroundImage [get, set] |
The location of a background image. E.g. "url(imgInResources.png)", "url(cache://cachedImage)". See PowerUI.FileProtocol for more information on the default protocols://. More... | |
string | backgroundPosition [get, set] |
The offset of the background. E.g. "10px 5px" (x,y). More... | |
string | backgroundRepeat [get, set] |
How the background should be repeated if at all. E.g. "repeat-x", "repeat-y", "none". More... | |
string | backgroundSize [get, set] |
How the background should be scaled if at all. E.g. "100% 100%" or "auto" (default). More... | |
string | backgroundSizeX [get, set] |
How the width of the background should be scaled if at all. E.g. "100%" or "auto" (default). More... | |
string | backgroundSizeY [get, set] |
How the height of the background should be scaled if at all. E.g. "100%" or "auto" (default). More... | |
string | backgroundClip [get, set] |
background-clip. More... | |
string | bottom [get, set] |
How far from the bottom this element is. E.g. "10px", "10%". What it's relative to depends on the position value. More... | |
string | borderStyle [get, set] |
The style of the border around the element. Can only be "solid" for now. More... | |
string | borderWidth [get, set] |
The width of the border around the element. E.g. "2px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left). More... | |
string | borderColor [get, set] |
The colour of the border around the element. E.g. "#ffffff". Also supports alpha (e.g. #ffffff77). More... | |
string | border [get, set] |
A shortcut for defining width, style and colour of all sides in one go. E.g. "2px solid #ffffff". More... | |
string | borderLeft [get, set] |
The width of the left border. E.g. "2px". More... | |
string | borderRight [get, set] |
The width of the right border. E.g. "2px". More... | |
string | borderTop [get, set] |
The width of the top border. E.g. "2px". More... | |
string | borderBottom [get, set] |
The width of the bottom border. E.g. "2px". More... | |
string | borderLeftStyle [get, set] |
The style of the left border. E.g. "solid". More... | |
string | borderRightStyle [get, set] |
The style of the right border. E.g. "solid". More... | |
string | borderTopStyle [get, set] |
The style of the top border. E.g. "solid". More... | |
string | borderBottomStyle [get, set] |
The style of the bottom border. E.g. "solid". More... | |
string | borderLeftColor [get, set] |
The color of the left border. More... | |
string | borderRightColor [get, set] |
The color of the right border. More... | |
string | borderTopColor [get, set] |
The color of the top border. More... | |
string | borderBottomColor [get, set] |
The color of the bottom border. More... | |
string | borderLeftWidth [get, set] |
The width of the left border. More... | |
string | borderRightWidth [get, set] |
The width of the right border. More... | |
string | borderTopWidth [get, set] |
The width of the top border. More... | |
string | borderBottomWidth [get, set] |
The width of the bottom border. More... | |
string | clear [get, set] |
The CSS clear property. More... | |
string | cssFloat [get, set] |
The CSS float property. More... | |
string | clip [get, set] |
The clip property. More... | |
string | color [get, set] |
The font colour. E.g. "#ffffff". More... | |
string | content [get, set] |
Sets the text content of this element. More... | |
string | colorOverlayR [get, set] |
The red component of the colour overlay as a value from 0->1. e.g. "0.5". More... | |
string | colorOverlayG [get, set] |
The green component of the colour overlay as a value from 0->1. e.g. "0.5". More... | |
string | colorOverlayB [get, set] |
The blue component of the colour overlay as a value from 0->1. e.g. "0.5". More... | |
string | colorOverlayA [get, set] |
The alpha component of the colour overlay as a value from 0->1. e.g. "0.5". More... | |
string | colorOverlay [get, set] |
A colour to apply over the top of this element. E.g. "#ff0000" will make it get a red tint. More... | |
string | cursor [get, set] |
The cursor property. More... | |
string | direction [get, set] |
The text direction. More... | |
string | display [get, set] |
How this element should sit around other elements. "inline", "inline-block", "block", "none" (not visible). More... | |
string | filter [get, set] |
Filter CSS property. More... | |
string | filterMode [get, set] |
How images should be filtered. "point", "bilinear","trilinear". More... | |
string | font [get, set] |
The font CSS property. More... | |
string | fontFamily [get, set] |
This property has strict usage. It must refer to the name of a font in resources only; e.g. "PowerUI/Arial". Currently, there can only be one font in use on screen. There is certainly scope for adding more in the future. More... | |
string | fontSize [get, set] |
The size of the font. E.g. "1.5em", "10px". More... | |
string | fontVariant [get, set] |
The font-variant property. More... | |
string | fontWeight [get, set] |
Sets the weight (thickness) of the font. "bold", "normal". More... | |
string | fontStyle [get, set] |
Sets the styling of the font. "italic", "oblique", "none". More... | |
string | height [get, set] |
Sets the height of this element. E.g. "50%", "120px". More... | |
string | left [get, set] |
How far from the left this element is. E.g. "10px", "10%". What it's relative to depends on the position value. More... | |
string | letterSpacing [get, set] |
Sets the gap between letters for custom kerning. You may also use a percentage, e.g. 100% is no spacing and 200% is a gap that is the size of the font size between letters. More... | |
string | lineHeight [get, set] |
Sets the line height for this element, e.g. "200%". More... | |
string | listStyle [get, set] |
Sets the list-style property. More... | |
string | listStyleImage [get, set] |
Sets the list-style-image property. More... | |
string | listStylePosition [get, set] |
Sets the list-style-position property. More... | |
string | listStyleType [get, set] |
Sets the list-style-type property. More... | |
string | margin [get, set] |
The margin around the outside of the element. E.g. "6px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left). More... | |
string | marginLeft [get, set] |
The size of the left margin around the outside of the element. E.g. "5px". More... | |
string | marginRight [get, set] |
The size of the right margin around the outside of the element. E.g. "5px". More... | |
string | marginTop [get, set] |
The size of the top margin around the outside of the element. E.g. "5px". More... | |
string | marginBottom [get, set] |
The size of the bottom margin around the outside of the element. E.g. "5px". More... | |
string | opacity [get, set] |
The opacity of the element as a value from 0->1. e.g. "0.5". More... | |
string | overflow [get, set] |
Sets what should happen if the content of an element overflows its boundaries. "scroll scroll" (x,y). More... | |
string | overflowX [get, set] |
What happens if the content of an element overflows the x boundary. "scroll", "hidden", "auto", "visible". More... | |
string | overflowY [get, set] |
What happens if the content of an element overflows the y boundary. "scroll", "hidden", "auto", "visible". More... | |
string | onAtlas [get, set] |
Should an image be on the atlas? May be globally overridden with UI.RenderMode. "true" (default) or "false". More... | |
string | padding [get, set] |
The size of the padding inside the element. E.g. "20px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left). More... | |
string | paddingLeft [get, set] |
The size of the left padding inside the element. E.g. "5px". More... | |
string | paddingRight [get, set] |
The size of the right padding inside the element. E.g. "5px". More... | |
string | paddingTop [get, set] |
The size of the top padding inside the element. E.g. "5px". More... | |
string | paddingBottom [get, set] |
The size of the bottom padding inside the element. E.g. "5px". More... | |
string | pageBreakAfter [get, set] |
The page-break-after property. More... | |
string | pageBreakBefore [get, set] |
The page-break-before property. More... | |
string | position [get, set] |
The position of this element. "fixed","relative","absolute". More... | |
string | right [get, set] |
How far from the right this element is. E.g. "10px", "10%". What it's relative to depends on the position value. More... | |
string | top [get, set] |
How far from the top this element is. E.g. "10px", "10%". What it's relative to depends on the position value. More... | |
string | textAlign [get, set] |
The horizontal alignment of text and other elements. "left", "right", "center", "justify". More... | |
string | transform [get, set] |
The transform to apply. More... | |
string | transformOrigin [get, set] |
The location of the transform origin in 2D screen space. E.g. "10px 10px", "50% 50%". More... | |
string | transformOriginX [get, set] |
The x component of the location of the transform origin in 2D screen space. More... | |
string | transformOriginY [get, set] |
The y component of the location of the transform origin in 2D screen space. More... | |
string | transformOriginPosition [get, set] |
How the origin is positioned. "relative" (to the top left corner of the element) or "fixed" (fixed location on the screen). More... | |
string | textDecoration [get, set] |
Can be used to apply a line to text. E.g. "underline", "line-through", "overline", "none". More... | |
bool | textDecorationBlink [get, set] |
text-decoration:blink. More... | |
bool | textDecorationLineThrough [get, set] |
text-decoration:line-through. More... | |
bool | textDecorationNone [get, set] |
text-decoration:none. More... | |
bool | textDecorationOverline [get, set] |
text-decoration:overline. More... | |
bool | textDecorationUnderline [get, set] |
text-decoration:underline. More... | |
string | verticalAlign [get, set] |
The vertical alignment of child elements. "top","middle","bottom". More... | |
string | visibility [get, set] |
Is this element visible? If not, it still takes up space. See display to make it act like it's not there at all. More... | |
string | width [get, set] |
Sets the width of this element. E.g. "50%", "120px". More... | |
string | wordSpacing [get, set] |
Sets the gap between words for custom kerning. More... | |
string | whiteSpace [get, set] |
Defines how text should wrap onto new lines. Either "nowrap" or "normal". More... | |
string | zIndex [get, set] |
Sets the depth of this element. The higher the value, the higher up the element. More... | |
string | fill [get, set] |
The fill of this element. More... | |
string | stroke [get, set] |
The stroke of this element. More... | |
string | floodColor [get, set] |
The flood-color of this element (feFlood). More... | |
string | floodOpacity [get, set] |
The flood-opacity of this element (feFlood). More... | |
Properties inherited from Css.Style | |
ReflowDocument | document [get] |
The document containing this style. More... | |
string | cssText [get, set] |
Sets the css text of this style as a css string seperated by semicolons (;). More... | |
Value | this[string cssProperty] [get, set] |
Gets or sets the parsed value of this style by property name. More... | |
virtual Value | this[CssProperty property] [get, set] |
Gets or sets the parsed value of this style by property name. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Css.Style | |
static Style | Create (string properties, Node element) |
Creates a style from the given property block with the given parent. More... | |
Package Functions inherited from Css.Style | |
Css.Value | GetBaseValue (CssProperty property) |
Gets or creates the base value for the given property. The base value is essentially the value held directly in this style sheet. E.g. if the value you're setting is the R channel of color-overlay, this sets up the color-overlay value for you. More... | |
|
inline |
Creates a new element style for the given element.
element | The element that this will be the style for. |
|
inlinevirtual |
|
inline |
JS API function for getting the computed style.
|
inlinevirtual |
Gets the given property as a css string. May optionally read the given inner index of it as a css string.
property | The property to get as a string. |
innerIndex | The inner value to get from the property. -1 for the whole property. |
Reimplemented from Css.Style.
|
inlinevirtual |
called when the named property changes.
property | The property that changed. |
newValue | It's new fully parsed value. May be null. |
Reimplemented from Css.Style.
ComputedStyle Css.ElementStyle.Computed |
The computed style of this element.
|
getset |
CSS animation.
|
getset |
A shortcut for applying an image, solid colour and the repeat setting all at once. E.g. "url(myImage.png) repeat-x #000000".
|
getset |
background-attachment.
|
getset |
background-clip.
|
getset |
The colour of a solid background. E.g. "#ffffff".
|
getset |
The location of a background image. E.g. "url(imgInResources.png)", "url(cache://cachedImage)". See PowerUI.FileProtocol for more information on the default protocols://.
|
getset |
The offset of the background. E.g. "10px 5px" (x,y).
|
getset |
How the background should be repeated if at all. E.g. "repeat-x", "repeat-y", "none".
|
getset |
How the background should be scaled if at all. E.g. "100% 100%" or "auto" (default).
|
getset |
How the width of the background should be scaled if at all. E.g. "100%" or "auto" (default).
|
getset |
How the height of the background should be scaled if at all. E.g. "100%" or "auto" (default).
|
getset |
A shortcut for defining width, style and colour of all sides in one go. E.g. "2px solid #ffffff".
|
getset |
The width of the bottom border. E.g. "2px".
|
getset |
The color of the bottom border.
|
getset |
Sets the bottom left border radius.
|
getset |
Sets the bottom right border radius.
|
getset |
The style of the bottom border. E.g. "solid".
|
getset |
The width of the bottom border.
|
getset |
The colour of the border around the element. E.g. "#ffffff". Also supports alpha (e.g. #ffffff77).
|
getset |
The width of the left border. E.g. "2px".
|
getset |
The color of the left border.
|
getset |
The style of the left border. E.g. "solid".
|
getset |
The width of the left border.
|
getset |
Sets the border radius of all corners.
|
getset |
The width of the right border. E.g. "2px".
|
getset |
The color of the right border.
|
getset |
The style of the right border. E.g. "solid".
|
getset |
The width of the right border.
|
getset |
The style of the border around the element. Can only be "solid" for now.
|
getset |
The width of the top border. E.g. "2px".
|
getset |
The color of the top border.
|
getset |
Sets the top left border radius.
|
getset |
Sets the top right border radius.
|
getset |
The style of the top border. E.g. "solid".
|
getset |
The width of the top border.
|
getset |
The width of the border around the element. E.g. "2px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left).
|
getset |
How far from the bottom this element is. E.g. "10px", "10%". What it's relative to depends on the position value.
|
getset |
The CSS clear property.
|
getset |
The clip property.
|
getset |
The font colour. E.g. "#ffffff".
|
getset |
A colour to apply over the top of this element. E.g. "#ff0000" will make it get a red tint.
|
getset |
The alpha component of the colour overlay as a value from 0->1. e.g. "0.5".
|
getset |
The blue component of the colour overlay as a value from 0->1. e.g. "0.5".
|
getset |
The green component of the colour overlay as a value from 0->1. e.g. "0.5".
|
getset |
The red component of the colour overlay as a value from 0->1. e.g. "0.5".
|
getset |
Sets the text content of this element.
|
getset |
The CSS float property.
|
getset |
The cursor property.
|
getset |
The text direction.
|
getset |
How this element should sit around other elements. "inline", "inline-block", "block", "none" (not visible).
|
getset |
The fill of this element.
|
getset |
Filter CSS property.
|
getset |
How images should be filtered. "point", "bilinear","trilinear".
|
getset |
The flood-color of this element (feFlood).
|
getset |
The flood-opacity of this element (feFlood).
|
getset |
The font CSS property.
|
getset |
This property has strict usage. It must refer to the name of a font in resources only; e.g. "PowerUI/Arial". Currently, there can only be one font in use on screen. There is certainly scope for adding more in the future.
|
getset |
The size of the font. E.g. "1.5em", "10px".
|
getset |
Sets the styling of the font. "italic", "oblique", "none".
|
getset |
The font-variant property.
|
getset |
Sets the weight (thickness) of the font. "bold", "normal".
|
getset |
Sets the height of this element. E.g. "50%", "120px".
|
getset |
How far from the left this element is. E.g. "10px", "10%". What it's relative to depends on the position value.
|
getset |
Sets the gap between letters for custom kerning. You may also use a percentage, e.g. 100% is no spacing and 200% is a gap that is the size of the font size between letters.
|
getset |
Sets the line height for this element, e.g. "200%".
|
getset |
Sets the list-style property.
|
getset |
Sets the list-style-image property.
|
getset |
Sets the list-style-position property.
|
getset |
Sets the list-style-type property.
|
getset |
The margin around the outside of the element. E.g. "6px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left).
|
getset |
The size of the bottom margin around the outside of the element. E.g. "5px".
|
getset |
The size of the left margin around the outside of the element. E.g. "5px".
|
getset |
The size of the right margin around the outside of the element. E.g. "5px".
|
getset |
The size of the top margin around the outside of the element. E.g. "5px".
|
getset |
The maximum height for this element.
|
getset |
The maximum width for this element.
|
getset |
The minimum height for this element. Default is 0px.
|
getset |
The minimum width for this element. Default is 0px.
|
getset |
Should an image be on the atlas? May be globally overridden with UI.RenderMode. "true" (default) or "false".
|
getset |
The opacity of the element as a value from 0->1. e.g. "0.5".
|
getset |
Sets what should happen if the content of an element overflows its boundaries. "scroll scroll" (x,y).
|
getset |
What happens if the content of an element overflows the x boundary. "scroll", "hidden", "auto", "visible".
|
getset |
What happens if the content of an element overflows the y boundary. "scroll", "hidden", "auto", "visible".
|
getset |
The size of the padding inside the element. E.g. "20px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left).
|
getset |
The size of the bottom padding inside the element. E.g. "5px".
|
getset |
The size of the left padding inside the element. E.g. "5px".
|
getset |
The size of the right padding inside the element. E.g. "5px".
|
getset |
The size of the top padding inside the element. E.g. "5px".
|
getset |
The page-break-after property.
|
getset |
The page-break-before property.
|
getset |
The position of this element. "fixed","relative","absolute".
|
getset |
How far from the right this element is. E.g. "10px", "10%". What it's relative to depends on the position value.
|
getset |
-spark-script-level.
|
getset |
-spark-script-min-size.
|
getset |
Sets the left scroll offset.
|
getset |
Sets the top scroll offset.
|
getset |
The PowerSlide CSS property. Works just like "animation" does.
|
getset |
The stroke of this element.
|
getset |
The horizontal alignment of text and other elements. "left", "right", "center", "justify".
|
getset |
How scrolling text gets clipped. By default this is "fast" and makes text look like it is being squished. "fast" or "clip".
|
getset |
Can be used to apply a line to text. E.g. "underline", "line-through", "overline", "none".
|
getset |
text-decoration:blink.
|
getset |
text-decoration:line-through.
|
getset |
text-decoration:none.
|
getset |
text-decoration:overline.
|
getset |
text-decoration:underline.
|
getset |
How far from the top this element is. E.g. "10px", "10%". What it's relative to depends on the position value.
|
getset |
The transform to apply.
|
getset |
The location of the transform origin in 2D screen space. E.g. "10px 10px", "50% 50%".
|
getset |
How the origin is positioned. "relative" (to the top left corner of the element) or "fixed" (fixed location on the screen).
|
getset |
The x component of the location of the transform origin in 2D screen space.
|
getset |
The y component of the location of the transform origin in 2D screen space.
|
getset |
The vertical alignment of child elements. "top","middle","bottom".
|
getset |
Is this element visible? If not, it still takes up space. See display to make it act like it's not there at all.
|
getset |
The voice in use.
|
getset |
Defines how text should wrap onto new lines. Either "nowrap" or "normal".
|
getset |
Sets the width of this element. E.g. "50%", "120px".
|
getset |
Sets the gap between words for custom kerning.
|
getset |
Sets the depth of this element. The higher the value, the higher up the element.