PowerUI.Css.CssProperties Class Reference

Detailed Description

A global lookup of property name to property. CssHandlers are instanced globally and mapped to the property names they accept. Note that properties are not instanced per element.

Static Public Member Functions

static void Setup (Type[] allTypes)
 Sets up the global lookup by searching for any classes which inherit from CssProperty. More...
 
static CssProperty Default ()
 Gets the default CSS property. More...
 
static bool Add (CssProperty property)
 Adds a CSS property to the global set. This is generally done automatically, but you can also add one manually if you wish. More...
 
static CssProperty Get (string property, string defaultProperty)
 Attempts to find the property with the given name. If it's not found, a default property which is known to exist can be returned instead. For example, property "color". More...
 
static CssProperty Get (string property, out int innerIndex)
 Attempts to find the named property, returning the global property if it's found. This works with all properties as it resolve the index too. More...
 
static CssProperty Get (string property)
 Attempts to find the named property, returning the global property if it's found. More...
 

Static Public Attributes

static Dictionary< string,
CssProperty
Properties
 The lookup itself. Matches property name (e.g. "color") to the property that will process it. More...
 
static Dictionary< string,
CssProperty
TextProperties
 All properties which apply directly to text. E.g. color,font-size etc. More...
 

Member Function Documentation

static bool PowerUI.Css.CssProperties.Add ( CssProperty  property)
inlinestatic

Adds a CSS property to the global set. This is generally done automatically, but you can also add one manually if you wish.

Parameters
propertyThe property to add.
Returns
True if adding it was successful.
static CssProperty PowerUI.Css.CssProperties.Default ( )
inlinestatic

Gets the default CSS property.

static CssProperty PowerUI.Css.CssProperties.Get ( string  property,
string  defaultProperty 
)
inlinestatic

Attempts to find the property with the given name. If it's not found, a default property which is known to exist can be returned instead. For example, property "color".

Parameters
propertyThe property to look for.
defaultPropertyIf the given property is not found, this is used instead.
Returns
The global property object.
static CssProperty PowerUI.Css.CssProperties.Get ( string  property,
out int  innerIndex 
)
inlinestatic

Attempts to find the named property, returning the global property if it's found. This works with all properties as it resolve the index too.

Parameters
propertyThe property to look for.
innerIndexSome properties are sets of properties, such as color and color-r. color-r is an "inner" property of color.
Returns
The global CssProperty if the property was found; Null otherwise.
static CssProperty PowerUI.Css.CssProperties.Get ( string  property)
inlinestatic

Attempts to find the named property, returning the global property if it's found.

Parameters
propertyThe property to look for.
Returns
The global CssProperty if the property was found; Null otherwise.
static void PowerUI.Css.CssProperties.Setup ( Type[]  allTypes)
inlinestatic

Sets up the global lookup by searching for any classes which inherit from CssProperty.

Member Data Documentation

Dictionary<string,CssProperty> PowerUI.Css.CssProperties.Properties
static

The lookup itself. Matches property name (e.g. "color") to the property that will process it.

Dictionary<string,CssProperty> PowerUI.Css.CssProperties.TextProperties
static

All properties which apply directly to text. E.g. color,font-size etc.