The .style property of a html element.
Public Member Functions | |
ElementStyle (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... | |
override ComputedStyle | GetComputed () |
Gets the computed form of this style. More... | |
override string | GetString (string property, int innerIndex) |
Gets the given property as a css string. May optionally read the given inner index of it as a css string. More... | |
override string | GetString (string property) |
Gets the given property as a css string. More... | |
Public Member Functions inherited from PowerUI.Css.Style | |
Style (Element element) | |
Creates a new style for the given element. More... | |
Style () | |
Creates a new, empty style definition. More... | |
Style (string text) | |
Creates a new style with the given css text string seperated by semicolons. More... | |
void | SetDirect (string property, string value) |
Directly sets the named property to the given value. Note that this does not refresh the style onscreen in anyway - it simply writes the new property value. Internal to the layout engine only. More... | |
Value | Get (string cssProperty) |
Gets the value of the given property, if any. More... | |
void | Set (string property, string value) |
Sets the named property on this style to the given value. More... | |
Css.Value | GetRawValue (CssProperty property, ValueType type) |
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... | |
Public Attributes | |
bool | IsPainting |
True if this element is being repainted on the next frame. More... | |
ElementStyle | Next |
Used for paint events. The next element style to paint. More... | |
ComputedStyle | Computed |
The computed style of this element. More... | |
Public Attributes inherited from PowerUI.Css.Style | |
Element | 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 PowerUI.Css.Value). More... | |
Properties | |
int | fastLeft [get, set] |
int | fastTop [get, set] |
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 | innerText [get, set] |
Sets the text of this element. Internal use only. More... | |
string | content [get, set] |
Sets the text content of this element. More... | |
string | lineHeight [get, set] |
Sets the line height for this element, e.g. "200%". 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 | wordSpacing [get, set] |
Sets the gap between words for custom kerning. More... | |
string | zIndex [get, set] |
Sets the depth of this element. The higher the value, the higher up the element. More... | |
string | whiteSpace [get, set] |
Defines how text should wrap onto new lines. Either "nowrap" or "normal". 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 | 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 [set] |
The size of the left margin around the outside of the element. E.g. "5px". More... | |
string | marginRight [set] |
The size of the right margin around the outside of the element. E.g. "5px". More... | |
string | marginTop [set] |
The size of the top margin around the outside of the element. E.g. "5px". More... | |
string | marginBottom [set] |
The size of the bottom margin around the outside of the element. E.g. "5px". 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 [set] |
The size of the left padding inside the element. E.g. "5px". More... | |
string | paddingRight [set] |
The size of the right padding inside the element. E.g. "5px". More... | |
string | paddingTop [set] |
The size of the top padding inside the element. E.g. "5px". More... | |
string | paddingBottom [set] |
The size of the bottom padding inside the element. E.g. "5px". 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 [set] |
A shortcut for defining width, style and colour of all sides in one go. E.g. "2px solid #ffffff". More... | |
string | borderLeft [set] |
The width of the left border. E.g. "2px". More... | |
string | borderRight [set] |
The width of the right border. E.g. "2px". More... | |
string | borderTop [set] |
The width of the top border. E.g. "2px". More... | |
string | borderBottom [set] |
The width of the bottom border. E.g. "2px". More... | |
string | borderLeftStyle [set] |
The style of the left border. E.g. "solid". More... | |
string | borderRightStyle [set] |
The style of the right border. E.g. "solid". More... | |
string | borderTopStyle [set] |
The style of the top border. E.g. "solid". More... | |
string | borderBottomStyle [set] |
The style of the bottom border. E.g. "solid". More... | |
string | borderLeftColor [set] |
The color of the left border. More... | |
string | borderRightColor [set] |
The color of the right border. More... | |
string | borderTopColor [set] |
The color of the top border. More... | |
string | borderBottomColor [set] |
The color of the bottom border. 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 | 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 | textDecoration [get, set] |
Can be used to apply a line to text. E.g. "underline", "line-through", "overline", "none". 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 | fontStyle [get, set] |
Sets the styling of the font. "italic", "oblique", "none". More... | |
string | fontWeight [get, set] |
Sets the weight (thickness) of the font. "bold", "normal". More... | |
string | fontSpreadover [get, set] |
The minimum font size in px at which spreadover occurs. As all characters get written to a texture, large font may cause this texture to fill up. Spreadover is the font size at which PowerUI will start searching for e.g. a specific bold version of the font to 'spread' or offload some of the characters onto. More... | |
string | fontSize [get, set] |
The size of the font. E.g. "1.5em", "10px". 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 | opacity [get, set] |
The opacity of the element as a value from 0->1. e.g. "0.5". More... | |
string | color [get, set] |
The font colour. E.g. "#ffffff". 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 | background [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 | 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 | filterMode [get, set] |
How images should be filtered. "point", "bilinear","trilinear". 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 | width [get, set] |
Sets the width of this element. E.g. "50%", "120px". 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 | 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 | 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 | vAlign [get, set] |
The vertical alignment of child elements. "top","middle","bottom". More... | |
string | verticalAlign [get, set] |
The vertical alignment of child elements. "top","middle","bottom". More... | |
string | textAlign [get, set] |
The horizontal alignment of text and other elements. "left", "right", "center", "justify". More... | |
string | position [get, set] |
The position of this element. "fixed","relative","absolute". More... | |
string | skewX [get, set] |
The x component of the skew. More... | |
string | skewY [get, set] |
The y component of the skew. More... | |
string | skewZ [get, set] |
The z component of the skew. More... | |
string | skew [get, set] |
Applies a skew to the element in 3D space. More... | |
string | rotateX [get, set] |
The x component of the rotation. E.g. "30deg". More... | |
string | rotateY [get, set] |
The y component of the rotation. E.g. "30deg". More... | |
string | rotateZ [get, set] |
The z component of the rotation. E.g. "30deg". More... | |
string | rotate [get, set] |
Applies a rotation to the element in 3D space. E.g. "5deg 6deg 4deg". More... | |
string | translateX [get, set] |
The x component of a translation in world space. E.g. "1.4". More... | |
string | translateY [get, set] |
The y component of a translation in world space. E.g. "1.4". More... | |
string | translateZ [get, set] |
The z component of a translation in world space. E.g. "1.4". More... | |
string | translate [get, set] |
Applies a translation to the element in 3D world space. E.g. "10 14 1.4". More... | |
string | scaleX [get, set] |
The x component of this elements scale. E.g. "110%". More... | |
string | scaleY [get, set] |
The y component of this elements scale. E.g. "110%". More... | |
string | scaleZ [get, set] |
The z component of this elements scale. E.g. "110%". More... | |
string | scale [get, set] |
The scale of this element. E.g. "150% 140%", "200%", "200% 200% 110%". 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... | |
Properties inherited from PowerUI.Css.Style | |
string | cssText [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... | |
Value | this[CssProperty property] [get, set] |
Gets or sets the parsed value of this style by property name. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from PowerUI.Css.Style | |
static char[] | Delimiter =new char[]{':'} |
The delimiter that seperates the property name from its value in css. More... | |
|
inline |
Creates a new element style for the given element.
element | The element that this will be the style for. |
|
inlinevirtual |
Gets the computed form of this style.
Reimplemented from PowerUI.Css.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 PowerUI.Css.Style.
|
inlinevirtual |
Gets the given property as a css string.
property | The property to get as a string. |
Reimplemented from PowerUI.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 PowerUI.Css.Style.
ComputedStyle PowerUI.Css.ElementStyle.Computed |
The computed style of this element.
bool PowerUI.Css.ElementStyle.IsPainting |
True if this element is being repainted on the next frame.
ElementStyle PowerUI.Css.ElementStyle.Next |
Used for paint events. The next element style to paint.
|
set |
A shortcut for applying an image, solid colour and the repeat setting all at once. E.g. "url(myImage.png) repeat-x #000000".
|
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).
|
set |
A shortcut for defining width, style and colour of all sides in one go. E.g. "2px solid #ffffff".
|
set |
The width of the bottom border. E.g. "2px".
|
set |
The color of the bottom border.
|
getset |
Sets the bottom left border radius.
|
getset |
Sets the bottom right border radius.
|
set |
The style of the bottom border. E.g. "solid".
|
getset |
The colour of the border around the element. E.g. "#ffffff". Also supports alpha (e.g. #ffffff77).
|
set |
The width of the left border. E.g. "2px".
|
set |
The color of the left border.
|
set |
The style of the left border. E.g. "solid".
|
getset |
Sets the border radius of all corners.
|
set |
The width of the right border. E.g. "2px".
|
set |
The color of the right border.
|
set |
The style of the right border. E.g. "solid".
|
getset |
The style of the border around the element. Can only be "solid" for now.
|
set |
The width of the top border. E.g. "2px".
|
set |
The color of the top border.
|
getset |
Sets the top left border radius.
|
getset |
Sets the top right border radius.
|
set |
The style of the top border. E.g. "solid".
|
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 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 text direction.
|
getset |
How this element should sit around other elements. "inline", "inline-block", "block", "none" (not visible).
|
getset |
|
getset |
|
getset |
How images should be filtered. "point", "bilinear","trilinear".
|
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 |
The minimum font size in px at which spreadover occurs. As all characters get written to a texture, large font may cause this texture to fill up. Spreadover is the font size at which PowerUI will start searching for e.g. a specific bold version of the font to 'spread' or offload some of the characters onto.
|
getset |
Sets the styling of the font. "italic", "oblique", "none".
|
getset |
Sets the weight (thickness) of the font. "bold", "normal".
|
getset |
Sets the height of this element. E.g. "50%", "120px".
|
getset |
Sets the text of this element. Internal use only.
|
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 |
The margin around the outside of the element. E.g. "6px" (all sides) or "4px 5px 4px 5px" (top,right,bottom,left).
|
set |
The size of the bottom margin around the outside of the element. E.g. "5px".
|
set |
The size of the left margin around the outside of the element. E.g. "5px".
|
set |
The size of the right margin around the outside of the element. E.g. "5px".
|
set |
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).
|
set |
The size of the bottom padding inside the element. E.g. "5px".
|
set |
The size of the left padding inside the element. E.g. "5px".
|
set |
The size of the right padding inside the element. E.g. "5px".
|
set |
The size of the top padding inside the element. E.g. "5px".
|
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 |
Applies a rotation to the element in 3D space. E.g. "5deg 6deg 4deg".
|
getset |
The x component of the rotation. E.g. "30deg".
|
getset |
The y component of the rotation. E.g. "30deg".
|
getset |
The z component of the rotation. E.g. "30deg".
|
getset |
The scale of this element. E.g. "150% 140%", "200%", "200% 200% 110%".
|
getset |
The x component of this elements scale. E.g. "110%".
|
getset |
The y component of this elements scale. E.g. "110%".
|
getset |
The z component of this elements scale. E.g. "110%".
|
getset |
Applies a skew to the element in 3D space.
|
getset |
The x component of the skew.
|
getset |
The y component of the skew.
|
getset |
The z component of the skew.
|
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 |
How far from the top this element is. E.g. "10px", "10%". What it's relative to depends on the position value.
|
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 |
Applies a translation to the element in 3D world space. E.g. "10 14 1.4".
|
getset |
The x component of a translation in world space. E.g. "1.4".
|
getset |
The y component of a translation in world space. E.g. "1.4".
|
getset |
The z component of a translation in world space. E.g. "1.4".
|
getset |
The vertical alignment of child elements. "top","middle","bottom".
|
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 |
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.