Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Style

Hierarchy

Index

Constructors

constructor

Properties

PropertyBag

PropertyBag: PropertyBagClass

The property bag is a simple class that is paired with the Style class. Setting regular css properties on the PropertyBag should simply preserve their values. Setting shorthand css properties on the PropertyBag should decompose the provided value, and set each of the shorthand composite properties. The shorthand properties are defined as non-enumerable so it should be safe to for-in the keys that are set in the bag.

Private _isViewBase

_isViewBase: boolean

Filed to use instead of instanceof ViewBase.

alignContent

alignContent: AlignContent

alignItems

alignItems: AlignItems

alignSelf

alignSelf: AlignSelf

androidDynamicElevationOffset

androidDynamicElevationOffset: number

androidElevation

androidElevation: number

androidSelectedTabHighlightColor

androidSelectedTabHighlightColor: Color

androidStatusBarBackground

androidStatusBarBackground: Color

background

background: string

backgroundColor

backgroundColor: Color

backgroundImage

backgroundImage: string | LinearGradient

backgroundInternal

backgroundInternal: Background

backgroundPosition

backgroundPosition: string

backgroundRepeat

backgroundRepeat: BackgroundRepeat

backgroundSize

backgroundSize: string

borderBottomColor

borderBottomColor: Color

borderBottomLeftRadius

borderBottomLeftRadius: Length

borderBottomRightRadius

borderBottomRightRadius: Length

borderBottomWidth

borderBottomWidth: Length

borderColor

borderColor: string | Color

borderLeftColor

borderLeftColor: Color

borderLeftWidth

borderLeftWidth: Length

borderRadius

borderRadius: string | Length

borderRightColor

borderRightColor: Color

borderRightWidth

borderRightWidth: Length

borderTopColor

borderTopColor: Color

borderTopLeftRadius

borderTopLeftRadius: Length

borderTopRightRadius

borderTopRightRadius: Length

borderTopWidth

borderTopWidth: Length

borderWidth

borderWidth: string | Length

clipPath

clipPath: string

color

color: Color

flexDirection

flexDirection: FlexDirection

flexGrow

flexGrow: FlexGrow

flexShrink

flexShrink: FlexShrink

flexWrap

flexWrap: FlexWrap

flexWrapBefore

flexWrapBefore: FlexWrapBefore

font

font: string

fontFamily

fontFamily: string

fontInternal

fontInternal: Font

fontSize

fontSize: number

fontStyle

fontStyle: FontStyle

fontWeight

fontWeight: FontWeight

height

horizontalAlignment

horizontalAlignment: HorizontalAlignment

justifyContent

justifyContent: JustifyContent

letterSpacing

letterSpacing: number

lineHeight

lineHeight: number

margin

margin: string | PercentLength

marginBottom

marginBottom: PercentLength

marginLeft

marginLeft: PercentLength

marginRight

marginRight: PercentLength

marginTop

marginTop: PercentLength

minHeight

minHeight: Length

minWidth

minWidth: Length

opacity

opacity: number

order

order: Order

padding

padding: string | Length

paddingBottom

paddingBottom: Length

paddingLeft

paddingLeft: Length

paddingRight

paddingRight: Length

paddingTop

paddingTop: Length

placeholderColor

placeholderColor: Color

rotate

rotate: number

scaleX

scaleX: number

scaleY

scaleY: number

selectedBackgroundColor

selectedBackgroundColor: Color

selectedTabTextColor

selectedTabTextColor: Color

separatorColor

separatorColor: Color

statusBarStyle

statusBarStyle: "light" | "dark"

tabBackgroundColor

tabBackgroundColor: Color

tabTextColor

tabTextColor: Color

tabTextFontSize

tabTextFontSize: number

textAlignment

textAlignment: TextAlignment

textDecoration

textDecoration: TextDecoration

textTransform

textTransform: TextTransform

tintColor

tintColor: Color

translateX

translateX: dip

translateY

translateY: dip

verticalAlignment

verticalAlignment: VerticalAlignment

view

view: ViewBase

visibility

visibility: Visibility

whiteSpace

whiteSpace: WhiteSpace

width

zIndex

zIndex: number

Static propertyChangeEvent

propertyChangeEvent: string

String value used when hooking to propertyChange event.

Methods

Private _createPropertyChangeData

Private _emit

  • _emit(eventNames: string): any

addEventListener

  • addEventListener(eventNames: string, callback: function, thisArg?: any): any
  • Adds a listener for the specified event name.

    Parameters

    • eventNames: string

      Comma delimited names of the events to attach the listener to.

    • callback: function

      A function to be called when some of the specified event(s) is raised.

    • Optional thisArg: any

      An optional parameter which when set will be used as "this" in callback method call.

    Returns any

get

  • get(name: string): any

hasListeners

  • hasListeners(eventName: string): boolean

notify

  • notify<T>(data: T): void

notifyPropertyChange

  • notifyPropertyChange(propertyName: string, value: any, oldValue?: any): void

off

  • off(eventNames: string, callback?: any, thisArg?: any): any

on

  • on(eventNames: string, callback: function, thisArg?: any): any
  • on(event: "propertyChange", callback: function, thisArg?: any): any
  • A basic method signature to hook an event listener (shortcut alias to the addEventListener method).

    Parameters

    • eventNames: string

      String corresponding to events (e.g. "propertyChange"). Optionally could be used more events separated by , (e.g. "propertyChange", "change").

    • callback: function

      Callback function which will be executed when event is raised.

    • Optional thisArg: any

      An optional parameter which will be used as this context for callback execution.

    Returns any

  • Raised when a propertyChange occurs.

    Parameters

    • event: "propertyChange"
    • callback: function
    • Optional thisArg: any

    Returns any

once

  • once(event: string, callback: function, thisArg?: any): any
  • Adds one-time listener function for the event named event.

    Parameters

    • event: string

      Name of the event to attach to.

    • callback: function

      A function to be called when the specified event is raised.

    • Optional thisArg: any

      An optional parameter which when set will be used as "this" in callback method call.

    Returns any

removeEventListener

  • removeEventListener(eventNames: string, callback?: any, thisArg?: any): any
  • Removes listener(s) for the specified event name.

    Parameters

    • eventNames: string

      Comma delimited names of the events the specified listener is associated with.

    • Optional callback: any

      An optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.

    • Optional thisArg: any

      An optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.

    Returns any

set

  • set(name: string, value: any): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method