Classes
AddedRemovedEvent
AlertElement
AnchorContainerElement
ArrowShape
ButtonElement
CanvasElement
CanvasManager
CheckboxElement
CheckboxSkinElement
CollectionChangedEvent
CollectionSort
ColorPickerButtonElement
ColorPickerElement
ContainerBaseElement
CursorDefinition
DataGridColumnDefinition
DataGridDataRenderer
DataGridElement
DataGridHeaderColumnDividerSkinElement
DataGridHeaderElement
DataGridHeaderItemRenderer
DataGridItemData
DataGridItemRendererBase
DataGridLabelItemRenderer
DataListData
DataListElement
DataRendererBaseElement
DataRendererLabelElement
DatePickerButtonElement
DatePickerElement
DispatcherEvent
DrawMetrics
DropdownArrowButtonSkinElement
DropdownBaseElement
DropdownElement
ElementEvent
ElementGridItemClickEvent
ElementKeyboardEvent
ElementListItemClickEvent
ElementMouseEvent
ElementMouseWheelEvent
EllipseShape
EventDispatcher
FillBase
GridContainerElement
GridContainerRowColumnDefinition
ImageElement
IpInputElement
LabelElement
LinearGradientFill
ListCollection
ListContainerElement
ProgressElement
RadioButtonElement
RadioButtonSkinElement
RoundedRectangleShape
ScrollBarElement
ScrollButtonSkinElement
ShapeBase
SkinnableElement
SolidFill
StyleableBase
StyleChangedEvent
StyleData
StyleDefinition
StyleProxy
TextAreaElement
TextElement
TextFieldElement
TextInputElement
TimeInputElement
ToggleButtonElement
ToggleButtonGroup
Tween
ViewportElement


ButtonElement

Button is a skin-able element that supports 4 states corresponding to mouse states
"up", "over", "down" and "disabled". It also has an optional label.
Being a SkinnableElement, Button proxies its styles to its skins.
You may assign custom skins and assign any styles you wish to apply to all skins to the Button itself.
Button is used as a base class for many click-able elements such as
ToggleButton, Checkbox, RadioButton, etc.

Inheritance:     ButtonElement ➞ SkinnableElementCanvasElementStyleableBaseStyleDefinitionEventDispatcher ➞ Object

Styles
Show Inherited
Style Defined By
DisabledSkinClass     :    CanvasElement ButtonElement
The CanvasElement constructor to be used for the button skin when the button is in the "disabled" state.
This will override SkinClass when equal or higher priority than SkinClass.
 
DisabledSkinStyle     :    StyleDefinition ButtonElement
The StyleDefinition or [StyleDefinition] array to apply to the "disabled" state skin element.
 
DisabledTextColor     :    String ButtonElement
Hex color value to be used for the button label when the button is in the "disabled" state. Format like "#FF0000" (red).
This will override TextColor when equal or higher priority than TextColor.
 
DownSkinClass     :    CanvasElement ButtonElement
The CanvasElement constructor to be used for the button skin when the button is in the "down" state.
This will override SkinClass when equal or higher priority than SkinClass.
 
DownSkinStyle     :    StyleDefinition ButtonElement
The StyleDefinition or [StyleDefinition] array to apply to the "down" state skin element.
 
DownTextColor     :    String ButtonElement
Hex color value to be used for the button label when the button is in the "down" state. Format like "#FF0000" (red).
This will override TextColor when equal or higher priority than TextColor.
 
OverSkinClass     :    CanvasElement ButtonElement
The CanvasElement constructor to be used for the button skin when the button is in the "over" state.
This will override SkinClass when equal or higher priority than SkinClass.
 
OverSkinStyle     :    StyleDefinition ButtonElement
The StyleDefinition or [StyleDefinition] array to apply to the "over" state skin element.
 
OverTextColor     :    String ButtonElement
Hex color value to be used for the button label when the button is in the "over" state. Format like "#FF0000" (red).
This will override TextColor when equal or higher priority than TextColor.
 
SkinClass     :    CanvasElement ButtonElement
The CanvasElement constructor type to apply to all skin states.
Specific states such as UpSkinClass will override SkinClass when they are equal priority.
 
Text     :    String ButtonElement
Text string to be displayed as the button label.
 
TextHorizontalAlign     :    String ButtonElement
Determines alignment when rendering text. Available values are "left", "center", and "right".
 
TextVerticalAlign     :    String ButtonElement
Determines the baseline when rendering text. Available values are "top", "middle", or "bottom".
 
UpSkinClass     :    CanvasElement ButtonElement
The CanvasElement constructor to be used for the button skin when the button is in the "up" state.
This will override SkinClass when equal or higher priority than SkinClass.
 
UpSkinStyle     :    StyleDefinition ButtonElement
The StyleDefinition or [StyleDefinition] array to apply to the "up" state skin element.
 
UpTextColor     :    String ButtonElement
Hex color value to be used for the button label when the button is in the "up" state. Format like "#FF0000" (red).
This will override TextColor when equal or higher priority than TextColor.
 


Events
Show Inherited


Public Functions
Show Inherited
Function Defined By
ButtonElement() [Constructor] ButtonElement
Creates new ButtonElement instance.
 


Internal Members
Show Inherited


Internal Functions
Show Inherited
Function Defined By
_createLabel() ButtonElement
Creates the Button's label instance when Text style is not null or empty.
  returns     :    LabelElement
New LabelElement instance
 
_getTextColor(state) ButtonElement
Gets the text color to be used for the supplied state.
Override this to add styles for additional states.
  state     :    String
String representing the state to return the text color style.
  returns     :    string
Text color for the supplied state.
 
_onButtonClick(elementMouseEvent) ButtonElement
Event handler for "click" event. Cancels the event if the Button is disabled.
Overriding this is more efficient than adding an additional "click" event listener.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onButtonMouseDown(elementMouseEvent) ButtonElement
Event handler for "mousedown" event. Updates the Button skin state.
Overriding this is more efficient than adding an additional "mousedown" event listener.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onButtonMouseUp(elementMouseEvent) ButtonElement
Event handler for "mouseup" event. Updates the Button skin state.
Overriding this is more efficient than adding an additional "mouseup" event listener.
  elementMouseEvent     :    ElementMouseEvent
The ElementMouseEvent to process.
 
_onButtonRollout(elementEvent) ButtonElement
Event handler for "rollout" event. Updates the Button skin state.
Overriding this is more efficient than adding an additional "rollout" event listener.
  elementEvent     :    ElementEvent
The ElementEvent to process.
 
_onButtonRollover(elementEvent) ButtonElement
Event handler for "rollover" event. Updates the Button skin state.
Overriding this is more efficient than adding an additional "rollover" event listener.
  elementEvent     :    ElementEvent
The ElementEvent to process.
 
_setLabelText(text) ButtonElement
Sets supplied text to the buttons label element, adds or destroys the label as necessary.
  text     :    String
String to be used for the label text.
 
_updateState() ButtonElement
Called in response to mouse events, and when the Button is added to the display hierarchy (if mouse is enabled).
Updates the Button skin state.
 
_updateText() ButtonElement
Updates the buttons text per styling.
This function calls _updateLabelText(text)
Override this if you need to change the source of the label text and
call _updateLabelText accordingly.
 
_updateTextColor() ButtonElement
Updates the text color in response to state changes.