StyleKey

Description

The StyleKey class is a helper class that exposes functions to create style keys assignable in StyleDefinition key and basedOn properties. Different types of style keys exist, each having its own purpose.

Functions

Function

Parameter

Type

Description

defaultKey

component

StyleType

 

 

part?

string

 

 

[output]

object

Returns a style key targeting a component or a component part’s default style.

stateKey

component

StyleType

 

 

part?

string

 

 

state

string

 

 

[output]

object

Returns a style key targeting a component or a component part’s state style.

baseKey

[output]

object

Returns a style key to put in the StyleDefinition basedOn property to inherit from a style with the same key.

Examples

See the example section of StyleDefinition.