8.6 Released with 🥽 visionOS support and more!
Check it out

Summary ​

Constructors

constructor

Properties

_automaticallyAdjustsScrollViewInsets
_context
_cssState
_defaultPaddingBottom
_defaultPaddingLeft
_defaultPaddingRight
_defaultPaddingTop
_domId
_ignoreFlexMinWidthHeightReset
_isAddedToNativeVisualTree
_isPaddingRelative
_isStyleScopeHost
_oldBottom
_oldLeft
_oldRight
_oldTop
_styleScope
_suspendNativeUpdatesCount
alignSelf
bindingContext
className
col
colSpan
column
columnSpan
createdEvent
cssClasses
cssPseudoClasses
disposeNativeViewEvent
dock
domNode
effectiveBorderBottomWidth
effectiveBorderLeftWidth
effectiveBorderRightWidth
effectiveBorderTopWidth
effectiveHeight
effectiveLeft
effectiveMarginBottom
effectiveMarginLeft
effectiveMarginRight
effectiveMarginTop
effectiveMinHeight
effectiveMinWidth
effectivePaddingBottom
effectivePaddingLeft
effectivePaddingRight
effectivePaddingTop
effectiveTop
effectiveWidth
flexGrow
flexShrink
flexWrapBefore
id
isCollapsed
left
loadedEvent
nativeViewProtected
order
parent
recycleNativeView
reusable
row
rowSpan
sharedTransitionIgnore
sharedTransitionTag
top
unloadedEvent
viewController
1 properties inherited from Observable
Click to expand

Methods

_addView
_addViewCore
_addViewToNativeVisualTree
_applyXmlAttribute
_batchUpdate
_childIndexToNativeChildIndex
_dialogClosed
_goToVisualState
_inheritStyleScope
_layoutParent
_onRootViewReset
_parentChanged
_removeView
_removeViewCore
_removeViewFromNativeVisualTree
_resumeNativeUpdates
_setupAsRootView
_setupUI
_shouldDelayLayout
_suspendNativeUpdates
_tearDownUI
addPseudoClass
bind
callLoaded
callUnloaded
closeModal
createNativeView
deletePseudoClass
destroyNode
disposeNativeView
eachChild
ensureDomNode
getViewByDomId
getViewById
initNativeView
loadView
onLoaded
onResumeNativeUpdates
onUnloaded
requestLayout
resetNativeView
set
setInlineStyle
setNativeView
showModal
toString
unbind
unloadView

Constructors ​

Properties ​

_automaticallyAdjustsScrollViewInsets ​

_automaticallyAdjustsScrollViewInsets: boolean

_cssState ​

_defaultPaddingBottom ​

_defaultPaddingBottom: number

_defaultPaddingLeft ​

_defaultPaddingLeft: number

_defaultPaddingRight ​

_defaultPaddingRight: number

_defaultPaddingTop ​

_defaultPaddingTop: number

_ignoreFlexMinWidthHeightReset ​

_ignoreFlexMinWidthHeightReset: boolean

_isAddedToNativeVisualTree ​

_isAddedToNativeVisualTree: boolean

_isPaddingRelative ​

_isPaddingRelative: boolean

_isStyleScopeHost ​

_isStyleScopeHost: boolean

_oldBottom ​

_styleScope ​

_suspendNativeUpdatesCount ​

_suspendNativeUpdatesCount: number
Determines the depth of suspended updates. When the value is 0 the current property updates are not batched nor scoped and must be immediately applied. If the value is 1 or greater, the current updates are batched and does not have to provide immediate update. Do not set this field, the _batchUpdate method is responsible to keep the count up to date, as well as adding/rmoving the view to/from the visual tree.

alignSelf ​

bindingContext ​

className ​

className: string
Gets or sets the CSS class name for this view.

columnSpan ​

cssClasses ​

cssClasses: Set<string>

cssPseudoClasses ​

cssPseudoClasses: Set<string>

dock ​

dock: "left" | "right" | "top" | "bottom"

effectiveBorderBottomWidth ​

effectiveBorderBottomWidth: number

effectiveBorderLeftWidth ​

effectiveBorderLeftWidth: number

effectiveBorderRightWidth ​

effectiveBorderRightWidth: number

effectiveBorderTopWidth ​

effectiveBorderTopWidth: number

effectiveHeight ​

effectiveLeft ​

effectiveMarginBottom ​

effectiveMarginBottom: number

effectiveMarginLeft ​

effectiveMarginLeft: number

effectiveMarginRight ​

effectiveMarginRight: number

effectiveMarginTop ​

effectiveMarginTop: number

effectiveMinHeight ​

effectiveMinHeight: number

effectiveMinWidth ​

effectiveMinWidth: number

effectivePaddingBottom ​

effectivePaddingBottom: number

effectivePaddingLeft ​

effectivePaddingLeft: number

effectivePaddingRight ​

effectivePaddingRight: number

effectivePaddingTop ​

effectivePaddingTop: number

effectiveTop ​

effectiveWidth ​

flexShrink ​

flexWrapBefore ​

id: string
Gets or sets the id for this view.

isCollapsed ​

isCollapsed: any
Returns true if visibility is set to 'collapse'. Default(false) set in prototype Readonly property

nativeViewProtected ​

nativeViewProtected: any
read-only. If you want to set out-of-band the nativeView use the setNativeView method.

parent ​

parent: ViewBase
Gets the parent view. This property is read-only.

recycleNativeView ​

recycleNativeView: "auto" | "always" | "never"

reusable ​

reusable: boolean
Gets or sets if the view is reusable. Reusable views are not automatically destroyed when removed from the View tree.

sharedTransitionIgnore ​

sharedTransitionIgnore: boolean
Opt out of shared transition under different binding conditions

sharedTransitionTag ​

sharedTransitionTag: string
Gets or sets the shared transition tag for animated view transitions

viewController ​

viewController: any
returns the native UIViewController.

createdEvent ​

Static
createdEvent: string
String value used when hooking to creation event

disposeNativeViewEvent ​

Static
disposeNativeViewEvent: string
String value used when hooking to disposeNativeView event

loadedEvent ​

Static
loadedEvent: string
String value used when hooking to loaded event.

unloadedEvent ​

Static
unloadedEvent: string
String value used when hooking to unloaded event.

Accessors ​

android ​

get android(): any

class ​

get class(): string

ios ​

get ios(): any

isLoaded ​

get isLoaded(): boolean

nativeView ​

get nativeView(): any

page ​

get page(): Page
Gets owner page. This is a read-only property.
Returns Page

parentNode ​

get parentNode(): ViewBase
Gets the template parent or the native parent. Sets the template parent.
Returns ViewBase

style ​

get style(): Style
Gets the style object associated to this view.
Returns Style

typeName ​

get typeName(): string
Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".
Returns string

Methods ​

_addView ​

_addView(view: ViewBase, atIndex?: number): void
Parameter Default Description
view

atIndex
number

Returns void

_addViewCore ​

_addViewCore(view: ViewBase, atIndex?: number): void
Method is intended to be overridden by inheritors and used as "protected"
Parameter Default Description
view

atIndex
number

Returns void

_addViewToNativeVisualTree ​

_addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean
Performs the core logic of adding a child view to the native visual tree. Returns true if the view's native representation has been successfully added, false otherwise. Method is intended to be overridden by inheritors and used as "protected".
Parameter Default Description
view

atIndex
number

Returns boolean

_applyXmlAttribute ​

_applyXmlAttribute(attribute: string, value: string): boolean
Parameter Default Description
attribute
string

value
string

Returns boolean

_batchUpdate ​

_batchUpdate<T>(callback: () => T): T
Allow multiple updates to be performed on the instance at once.
Parameter Default Description
callback
() => T

Returns T

_childIndexToNativeChildIndex ​

_childIndexToNativeChildIndex(index?: number): number
Parameter Default Description
index
number

Returns number

_dialogClosed ​

_dialogClosed(): void
Method is intended to be overridden by inheritors and used as "protected"
Returns void

_goToVisualState ​

_goToVisualState(state: string): void
Parameter Default Description
state
string

Returns void

_inheritStyleScope ​

_inheritStyleScope(styleScope: StyleScope): void
Parameter Default Description
styleScope
StyleScope

Returns void

_layoutParent ​

_layoutParent(): void

_onRootViewReset ​

_onRootViewReset(): void
Method is intended to be overridden by inheritors and used as "protected"
Returns void

_parentChanged ​

_parentChanged(oldParent: ViewBase): void
Parameter Default Description
oldParent

Returns void

_removeView ​

_removeView(view: ViewBase): void
Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
Parameter Default Description
view

Returns void

_removeViewCore ​

_removeViewCore(view: ViewBase): void
Method is intended to be overridden by inheritors and used as "protected"
Parameter Default Description
view

Returns void

_removeViewFromNativeVisualTree ​

_removeViewFromNativeVisualTree(view: ViewBase): void
Method is intended to be overridden by inheritors and used as "protected"
Parameter Default Description
view

Returns void

_resumeNativeUpdates ​

_resumeNativeUpdates(type: SuspendType): void
Parameter Default Description
type
SuspendType

Returns void

_setupAsRootView ​

_setupAsRootView(context: any): void
Parameter Default Description
context
any

Returns void

_setupUI ​

_setupUI(context: any, atIndex?: number, parentIsLoaded?: boolean): void
Setups the UI for ViewBase and all its children recursively. This method should *not* be overridden by derived views.
Parameter Default Description
context
any

atIndex
number

parentIsLoaded
boolean

Returns void

_shouldDelayLayout ​

_shouldDelayLayout(): boolean
When returning true the callLoaded method will be run in setTimeout Method is intended to be overridden by inheritors and used as "protected"
Returns boolean

_suspendNativeUpdates ​

_suspendNativeUpdates(type: SuspendType): void
Parameter Default Description
type
SuspendType

Returns void

_tearDownUI ​

_tearDownUI(force?: boolean): void
Tears down the UI for ViewBase and all its children recursively. This method should *not* be overridden by derived views.
Parameter Default Description
force
boolean

Returns void

addPseudoClass ​

Protected
addPseudoClass(name: string): void
Parameter Default Description
name
string

Returns void

bind ​

bind(options: BindingOptions, source?: Object): void
Parameter Default Description
options

source
Object

Returns void

callLoaded ​

callLoaded(): void

callUnloaded ​

callUnloaded(): void

closeModal ​

closeModal(...args: any[]): void
Closes the current modal view that this page is showing.
Parameter Default Description
args
any[]

Returns void

createNativeView ​

createNativeView(): Object
Creates a native view. Returns either android.view.View or UIView.
Returns Object

deletePseudoClass ​

Protected
deletePseudoClass(name: string): void
Parameter Default Description
name
string

Returns void

destroyNode ​

destroyNode(forceDestroyChildren?: boolean): void
Tears down the UI of a reusable node by making it no longer reusable.
Parameter Default Description
forceDestroyChildren
boolean

Force destroy the children (even if they are reusable)

Returns void

disposeNativeView ​

disposeNativeView(): void
Clean up references to the native view.
Returns void

eachChild ​

eachChild(callback: (child: ViewBase) => boolean): void
Iterates over children of type ViewBase.
Parameter Default Description
callback
(child: ViewBase) => boolean

Called for each child of type ViewBase. Iteration stops if this method returns falsy value.

Returns void

ensureDomNode ​

ensureDomNode(): void

getViewByDomId ​

getViewByDomId<T>(domId: number): T
Returns the child view with the specified domId.
Parameter Default Description
domId
number

Returns T

getViewById ​

getViewById<T>(id: string): T
Returns the child view with the specified id.
Parameter Default Description
id
string

Returns T

initNativeView ​

initNativeView(): void
Initializes properties/listeners of the native view.
Returns void

loadView ​

loadView(view: ViewBase): void
Load view.
Parameter Default Description
view

to load.

Returns void

onLoaded ​

onLoaded(): void

onResumeNativeUpdates ​

onResumeNativeUpdates(): void

onUnloaded ​

onUnloaded(): void

requestLayout ​

requestLayout(): void
Invalidates the layout of the view and triggers a new layout pass.
Returns void

resetNativeView ​

resetNativeView(): void
Resets properties/listeners set to the native view.
Returns void

set ​

set(name: string, value: any): void
Parameter Default Description
name
string

value
any

Returns void

setInlineStyle ​

setInlineStyle(style: string): void
Parameter Default Description
style
string

Returns void

setNativeView ​

setNativeView(value: any): void
Set the nativeView field performing extra checks and updates to the native properties on the new view. Use in cases where the createNativeView is not suitable. As an example use in item controls where the native parent view will create the native views for child items.
Parameter Default Description
value
any

Returns void

showModal ​

showModal(view: ViewBase, modalOptions?: ShowModalOptions): ViewBase
Shows the view passed as parameter as a modal view.
Parameter Default Description
view

View instance to be shown modally.

modalOptions

A ShowModalOptions instance

Returns ViewBase
showModal(moduleName: string, modalOptions?: ShowModalOptions): ViewBase
Shows the View contained in moduleName as a modal view.
Parameter Default Description
moduleName
string

The name of the module to load starting from the application root.

modalOptions

A ShowModalOptions instance

Returns ViewBase

toString ​

toString(): string

unbind ​

unbind(property: string): void
Parameter Default Description
property
string

Returns void

unloadView ​

unloadView(view: ViewBase): void
Unload view.
Parameter Default Description
view

to unload.

Returns void
Previous
View