NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

Defined in: ui/text-base/formatted-string.d.ts:17

A class used to create a formatted (rich text) string.

Ns View ​

FormattedString

Extends ​

Constructors ​

Constructor ​

ts
new FormattedString(): FormattedString;

Defined in: ui/core/view-base/index.ts

Returns ​

FormattedString

Inherited from ​

ViewBase.constructor

Properties ​

_automaticallyAdjustsScrollViewInsets ​

ts
_automaticallyAdjustsScrollViewInsets: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._automaticallyAdjustsScrollViewInsets


_context ​

ts
_context: any;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._context


_cssState ​

ts
_cssState: CssState;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._cssState


_defaultPaddingBottom ​

ts
protected _defaultPaddingBottom: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._defaultPaddingBottom


_defaultPaddingLeft ​

ts
protected _defaultPaddingLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._defaultPaddingLeft


_defaultPaddingRight ​

ts
protected _defaultPaddingRight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._defaultPaddingRight


_defaultPaddingTop ​

ts
protected _defaultPaddingTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._defaultPaddingTop


_domId ​

ts
_domId: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._domId


_ignoreFlexMinWidthHeightReset ​

ts
_ignoreFlexMinWidthHeightReset: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._ignoreFlexMinWidthHeightReset


_isAddedToNativeVisualTree ​

ts
_isAddedToNativeVisualTree: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._isAddedToNativeVisualTree


_isPaddingRelative ​

ts
protected _isPaddingRelative: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._isPaddingRelative


_isStyleScopeHost ​

ts
_isStyleScopeHost: boolean;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._isStyleScopeHost


_oldBottom ​

ts
_oldBottom: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._oldBottom


_oldLeft ​

ts
_oldLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._oldLeft


_oldRight ​

ts
_oldRight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._oldRight


_oldTop ​

ts
_oldTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._oldTop


_styleScope ​

ts
_styleScope: StyleScope;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase._styleScope


_suspendNativeUpdatesCount ​

ts
_suspendNativeUpdatesCount: number;

Defined in: ui/core/view-base/index.ts

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.

Inherited from ​

ViewBase._suspendNativeUpdatesCount


alignSelf ​

ts
alignSelf: AlignSelf;

Defined in: ui/core/view-base/index.ts

(Android-only) Overrides the alignItems value for the child.

Ns Property ​

Inherited from ​

ViewBase.alignSelf


backgroundColor ​

ts
backgroundColor: Color;

Defined in: ui/text-base/formatted-string.d.ts:82

Gets or sets the font background color which will be used for all spans that doesn't have a specific value.

Ns Property ​


bindingContext ​

ts
bindingContext: any;

Defined in: ui/core/view-base/index.ts

Ns Property ​

Inherited from ​

ViewBase.bindingContext


className ​

ts
className: string;

Defined in: ui/core/view-base/index.ts

Gets or sets the CSS class name for this view.

Ns Property ​

Inherited from ​

ViewBase.className


col ​

ts
col: number;

Defined in: ui/core/view-base/index.ts

The column for the element. The columns are 0-indexed, so the first column is indicated by 0.

Ns Property ​

Inherited from ​

ViewBase.col


color ​

ts
color: Color;

Defined in: ui/text-base/formatted-string.d.ts:75

Gets or sets the font foreground color which will be used for all spans that doesn't have a specific value.

Ns Property ​


colSpan ​

ts
colSpan: number;

Defined in: ui/core/view-base/index.ts

The number of columns for the element to span across.

Ns Property ​

Inherited from ​

ViewBase.colSpan


column ​

ts
column: number;

Defined in: ui/core/view-base/index.ts

The column for the element. The columns are 0-indexed, so the first column is indicated by 0.

Ns Property ​

Inherited from ​

ViewBase.column


columnSpan ​

ts
columnSpan: number;

Defined in: ui/core/view-base/index.ts

Ns Property ​

Inherited from ​

ViewBase.columnSpan


cssClasses ​

ts
readonly cssClasses: Set<string>;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.cssClasses


cssPseudoClasses ​

ts
readonly cssPseudoClasses: Set<string>;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.cssPseudoClasses


defaultVisualState ​

ts
defaultVisualState: string;

Defined in: ui/core/view-base/index.ts

Default visual state, defaults to 'normal'

Ns Property ​

Inherited from ​

ViewBase.defaultVisualState


dock ​

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

Defined in: ui/core/view-base/index.ts

Dock position of the view within its parent.

Ns Property ​

Inherited from ​

ViewBase.dock


domNode ​

ts
domNode: DOMNode;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.domNode


effectiveBorderBottomWidth ​

ts
effectiveBorderBottomWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveBorderBottomWidth


effectiveBorderLeftWidth ​

ts
effectiveBorderLeftWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveBorderLeftWidth


effectiveBorderRightWidth ​

ts
effectiveBorderRightWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveBorderRightWidth


effectiveBorderTopWidth ​

ts
effectiveBorderTopWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveBorderTopWidth


effectiveColumnGap ​

ts
effectiveColumnGap: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveColumnGap


effectiveHeight ​

ts
effectiveHeight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveHeight


effectiveLeft ​

ts
effectiveLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveLeft


effectiveMarginBottom ​

ts
effectiveMarginBottom: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMarginBottom


effectiveMarginLeft ​

ts
effectiveMarginLeft: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMarginLeft


effectiveMarginRight ​

ts
effectiveMarginRight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMarginRight


effectiveMarginTop ​

ts
effectiveMarginTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMarginTop


effectiveMaxHeight ​

ts
effectiveMaxHeight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMaxHeight


effectiveMaxWidth ​

ts
effectiveMaxWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMaxWidth


effectiveMinHeight ​

ts
effectiveMinHeight: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMinHeight


effectiveMinWidth ​

ts
effectiveMinWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveMinWidth


effectiveRowGap ​

ts
effectiveRowGap: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveRowGap


effectiveTop ​

ts
effectiveTop: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveTop


effectiveWidth ​

ts
effectiveWidth: number;

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.effectiveWidth


flexGrow ​

ts
flexGrow: number;

Defined in: ui/core/view-base/index.ts

Indicates that the child should grow in size, if necessary. Sets how much the child will grow in proportion to the rest of the child elements in the flex container.

Ns Property ​

Inherited from ​

ViewBase.flexGrow


flexShrink ​

ts
flexShrink: number;

Defined in: ui/core/view-base/index.ts

Indicates that the child should shrink when the row runs out of space. Sets how much the flex item will shrink in proportion to the rest of the child elements in the flex container. When not specified, its value is set to 1.

Ns Property ​

Inherited from ​

ViewBase.flexShrink


flexWrapBefore ​

ts
flexWrapBefore: boolean;

Defined in: ui/core/view-base/index.ts

When true, forces the item to wrap onto a new line.

Ns Property ​

Inherited from ​

ViewBase.flexWrapBefore


fontFamily ​

ts
fontFamily: string;

Defined in: ui/text-base/formatted-string.d.ts:33

Gets or sets the font family which will be used for all spans that doesn't have a specific value.

Ns Property ​


fontSize ​

ts
fontSize: number;

Defined in: ui/text-base/formatted-string.d.ts:40

Gets or sets the font size which will be used for all spans that doesn't have a specific value.

Ns Property ​


fontStyle ​

ts
fontStyle: FontStyleType;

Defined in: ui/text-base/formatted-string.d.ts:47

Gets or sets the font style which will be used for all spans that doesn't have a specific value.

Ns Property ​


fontVariationSettings ​

ts
fontVariationSettings: FontVariationSettingsType[];

Defined in: ui/text-base/formatted-string.d.ts:61

Gets or sets the font variation settings which will be used for all spans that doesn't have a specific value.

Ns Property ​


fontWeight ​

ts
fontWeight: FontWeightType;

Defined in: ui/text-base/formatted-string.d.ts:54

Gets or sets the font weight which will be used for all spans that doesn't have a specific value.

Ns Property ​


hidden ​

ts
hidden: boolean;

Defined in: ui/core/view-base/index.ts

Gets or sets the visual state of the view.

Ns Property ​

Inherited from ​

ViewBase.hidden


id ​

ts
id: string;

Defined in: ui/core/view-base/index.ts

Gets or sets the id for this view.

Ns Property ​

Inherited from ​

ViewBase.id


iosAccessibilityAdjustsFontSize ​

ts
iosAccessibilityAdjustsFontSize: boolean;

Defined in: ui/text-base/formatted-string.d.ts:89

Defines whether accessibility font scale should affect font size.

Ns Property ​


iosAccessibilityMaxFontScale ​

ts
iosAccessibilityMaxFontScale: number;

Defined in: ui/text-base/formatted-string.d.ts:103

Gets or sets the maximum accessibility font scale.

Ns Property ​


iosAccessibilityMinFontScale ​

ts
iosAccessibilityMinFontScale: number;

Defined in: ui/text-base/formatted-string.d.ts:96

Gets or sets the minimum accessibility font scale.

Ns Property ​


isCollapsed ​

ts
isCollapsed: any;

Defined in: ui/core/view-base/index.ts

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

Inherited from ​

ViewBase.isCollapsed


left ​

ts
left: LengthType;

Defined in: ui/core/view-base/index.ts

Gets or sets the distance, in pixels, between the left edge of the child and the left edge of its parent.

Ns Property ​

Inherited from ​

ViewBase.left


nativeViewProtected ​

ts
nativeViewProtected: any;

Defined in: ui/core/view-base/index.ts

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

Inherited from ​

ViewBase.nativeViewProtected


order ​

ts
order: number;

Defined in: ui/core/view-base/index.ts

Sets the order in which child elements inside a Flex appear in relation to one another.

Ns Property ​

Inherited from ​

ViewBase.order


parent ​

ts
parent: ViewBase;

Defined in: ui/core/view-base/index.ts

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

Inherited from ​

ViewBase.parent


recycleNativeView ​

ts
recycleNativeView: "auto" | "always" | "never";

Defined in: ui/core/view-base/index.ts

Inherited from ​

ViewBase.recycleNativeView


reusable ​

ts
reusable: boolean;

Defined in: ui/core/view-base/index.ts

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

Ns Property ​

Inherited from ​

ViewBase.reusable


row ​

ts
row: number;

Defined in: ui/core/view-base/index.ts

The row for the element. The rows are 0-indexed, so the first row is indicated by 0.

Ns Property ​

Inherited from ​

ViewBase.row


rowSpan ​

ts
rowSpan: number;

Defined in: ui/core/view-base/index.ts

The number of rows for the element to span across.

Ns Property ​

Inherited from ​

ViewBase.rowSpan


sharedTransitionIgnore ​

ts
sharedTransitionIgnore: boolean;

Defined in: ui/core/view-base/index.ts

Opt out of shared transition under different binding conditions

Ns Property ​

Inherited from ​

ViewBase.sharedTransitionIgnore


sharedTransitionTag ​

ts
sharedTransitionTag: string;

Defined in: ui/core/view-base/index.ts

Gets or sets the shared transition tag for animated view transitions

Ns Property ​

Inherited from ​

ViewBase.sharedTransitionTag


spans ​

ts
spans: ObservableArray<Span>;

Defined in: ui/text-base/formatted-string.d.ts:21

An observable collection of Span objects used to define common text properties.


textDecoration ​

ts
textDecoration: TextDecorationType;

Defined in: ui/text-base/formatted-string.d.ts:68

Gets or sets text decorations which will be used for all spans that doesn't have a specific value.

Ns Property ​


top ​

ts
top: LengthType;

Defined in: ui/core/view-base/index.ts

Gets or sets the distance, in pixels, between the top edge of the child and the top edge of its parent.

Ns Property ​

Inherited from ​

ViewBase.top


viewController ​

ts
viewController: any;

Defined in: ui/core/view-base/index.ts

returns the native UIViewController.

Inherited from ​

ViewBase.viewController


createdEvent ​

ts
static createdEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to creation event

Ns Event ​

created

Inherited from ​

ViewBase.createdEvent


disposeNativeViewEvent ​

ts
static disposeNativeViewEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to disposeNativeView event

Ns Event ​

disposeNativeView

Inherited from ​

ViewBase.disposeNativeViewEvent


loadedEvent ​

ts
static loadedEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to loaded event.

Ns Event ​

loaded

Inherited from ​

ViewBase.loadedEvent


propertyChangeEvent ​

ts
static propertyChangeEvent: string;

Defined in: data/observable/index.ts

String value used when hooking to propertyChange event.

Ns Event ​

propertyChange

Inherited from ​

ViewBase.propertyChangeEvent


unloadedEvent ​

ts
static unloadedEvent: string;

Defined in: ui/core/view-base/index.ts

String value used when hooking to unloaded event.

Ns Event ​

unloaded

Inherited from ​

ViewBase.unloadedEvent

Accessors ​

android ​

Get Signature ​

ts
get android(): any;

Defined in: ui/core/view-base/index.ts

Returns ​

any

Inherited from ​

ViewBase.android


class ​

Get Signature ​

ts
get class(): string;

Defined in: ui/core/view-base/index.ts

Returns ​

string

Set Signature ​

ts
set class(v: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vstring
Returns ​

void

Inherited from ​

ViewBase.class


cssType ​

Get Signature ​

ts
get cssType(): string;

Defined in: ui/core/view-base/index.ts

Gets the CSS fully qualified type name used for selector matching.

Returns ​

string

Set Signature ​

ts
set cssType(value: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
valuestring
Returns ​

void

Inherited from ​

ViewBase.cssType


effectivePaddingBottom ​

Get Signature ​

ts
get effectivePaddingBottom(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingBottom(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ViewBase.effectivePaddingBottom


effectivePaddingLeft ​

Get Signature ​

ts
get effectivePaddingLeft(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingLeft(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ViewBase.effectivePaddingLeft


effectivePaddingRight ​

Get Signature ​

ts
get effectivePaddingRight(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingRight(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ViewBase.effectivePaddingRight


effectivePaddingTop ​

Get Signature ​

ts
get effectivePaddingTop(): number;

Defined in: ui/core/view-base/index.ts

Returns ​

number

Set Signature ​

ts
set effectivePaddingTop(v: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
vnumber
Returns ​

void

Inherited from ​

ViewBase.effectivePaddingTop


ios ​

Get Signature ​

ts
get ios(): any;

Defined in: ui/core/view-base/index.ts

Returns ​

any

Inherited from ​

ViewBase.ios


isLoaded ​

Get Signature ​

ts
get isLoaded(): boolean;

Defined in: ui/core/view-base/index.ts

Returns ​

boolean

Inherited from ​

ViewBase.isLoaded


nativeView ​

Get Signature ​

ts
get nativeView(): any;

Defined in: ui/core/view-base/index.ts

Returns ​

any

Set Signature ​

ts
set nativeView(value: any): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
valueany
Returns ​

void

Inherited from ​

ViewBase.nativeView


page ​

Get Signature ​

ts
get page(): Page;

Defined in: ui/core/view-base/index.ts

Gets owner page. This is a read-only property.

Returns ​

Page

Inherited from ​

ViewBase.page


parentNode ​

Get Signature ​

ts
get parentNode(): ViewBase;

Defined in: ui/core/view-base/index.ts

Gets the template parent or the native parent. Sets the template parent.

Returns ​

ViewBase

Set Signature ​

ts
set parentNode(node: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Parameters ​
ParameterType
nodeViewBase
Returns ​

void

Inherited from ​

ViewBase.parentNode


style ​

Get Signature ​

ts
get style(): Style;

Defined in: ui/core/view-base/index.ts

Gets the style object associated to this view.

Returns ​

Style

Set Signature ​

ts
set style(inlineStyle: Style): void;

Defined in: ui/core/view-base/index.ts

Ns Property ​
Parameters ​
ParameterType
inlineStyleStyle
Returns ​

void

Inherited from ​

ViewBase.style


typeName ​

Get Signature ​

ts
get typeName(): string;

Defined in: ui/core/view-base/index.ts

Gets the name of the constructor function for this instance. E.g. for a Button class this will return "Button".

Returns ​

string

Inherited from ​

ViewBase.typeName


visualState ​

Get Signature ​

ts
get visualState(): string;

Defined in: ui/core/view-base/index.ts

Deprecated ​
Returns ​

string

Inherited from ​

ViewBase.visualState

Methods ​

_addView() ​

ts
_addView(view: ViewBase, atIndex?: number): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
viewViewBase
atIndex?number

Returns ​

void

Inherited from ​

ViewBase._addView


_addViewCore() ​

ts
_addViewCore(view: ViewBase, atIndex?: number): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Parameters ​

ParameterType
viewViewBase
atIndex?number

Returns ​

void

Inherited from ​

ViewBase._addViewCore


_addViewToNativeVisualTree() ​

ts
_addViewToNativeVisualTree(view: ViewBase, atIndex?: number): boolean;

Defined in: ui/core/view-base/index.ts

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".

Parameters ​

ParameterType
viewViewBase
atIndex?number

Returns ​

boolean

Inherited from ​

ViewBase._addViewToNativeVisualTree


_addVisualState() ​

ts
_addVisualState(state: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
statestring

Returns ​

void

Inherited from ​

ViewBase._addVisualState


_applyXmlAttribute() ​

ts
_applyXmlAttribute(attribute: string, value: string): boolean;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
attributestring
valuestring

Returns ​

boolean

Deprecated ​

This used to be the way to set attribute values in early {N} versions. Now attributes are expected to be set as plain properties on the view instances.

Inherited from ​

ViewBase._applyXmlAttribute


_batchUpdate() ​

ts
_batchUpdate<T>(callback: () => T): T;

Defined in: ui/core/view-base/index.ts

Allow multiple updates to be performed on the instance at once.

Type Parameters ​

Type Parameter
T

Parameters ​

ParameterType
callback() => T

Returns ​

T

Inherited from ​

ViewBase._batchUpdate


_childIndexToNativeChildIndex() ​

ts
_childIndexToNativeChildIndex(index?: number): number;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
index?number

Returns ​

number

Inherited from ​

ViewBase._childIndexToNativeChildIndex


_createPropertyChangeData() ​

ts
_createPropertyChangeData(
   propertyName: string, 
   value: any, 
   oldValue?: any): PropertyChangeData;

Defined in: data/observable/index.ts

This method is intended to be overriden by inheritors to provide additional implementation.

Parameters ​

ParameterType
propertyNamestring
valueany
oldValue?any

Returns ​

PropertyChangeData

Inherited from ​

ViewBase._createPropertyChangeData


_dialogClosed() ​

ts
_dialogClosed(): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Returns ​

void

Inherited from ​

ViewBase._dialogClosed


_emit() ​

ts
_emit(eventName: string): void;

Defined in: data/observable/index.ts

Parameters ​

ParameterType
eventNamestring

Returns ​

void

Inherited from ​

ViewBase._emit


_goToVisualState() ​

ts
_goToVisualState(state: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
statestring

Returns ​

void

Deprecated ​

Use View._addVisualState() and View._removeVisualState() instead.

Inherited from ​

ViewBase._goToVisualState


_inheritStyles() ​

ts
_inheritStyles(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ViewBase._inheritStyles


_inheritStyleScope() ​

ts
_inheritStyleScope(styleScope: StyleScope): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
styleScopeStyleScope

Returns ​

void

Inherited from ​

ViewBase._inheritStyleScope


_layoutParent() ​

ts
_layoutParent(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ViewBase._layoutParent


_onRootViewReset() ​

ts
_onRootViewReset(): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Returns ​

void

Inherited from ​

ViewBase._onRootViewReset


_parentChanged() ​

ts
_parentChanged(oldParent: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
oldParentViewBase

Returns ​

void

Inherited from ​

ViewBase._parentChanged


_removeView() ​

ts
_removeView(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

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.

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ViewBase._removeView


_removeViewCore() ​

ts
_removeViewCore(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ViewBase._removeViewCore


_removeViewFromNativeVisualTree() ​

ts
_removeViewFromNativeVisualTree(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Method is intended to be overridden by inheritors and used as "protected"

Parameters ​

ParameterType
viewViewBase

Returns ​

void

Inherited from ​

ViewBase._removeViewFromNativeVisualTree


_removeVisualState() ​

ts
_removeVisualState(state: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
statestring

Returns ​

void

Inherited from ​

ViewBase._removeVisualState


_resumeNativeUpdates() ​

ts
_resumeNativeUpdates(type: SuspendType): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
typeSuspendType

Returns ​

void

Inherited from ​

ViewBase._resumeNativeUpdates


_setDefaultPaddings() ​

ts
_setDefaultPaddings(insets: any): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
insetsany

Returns ​

void

Inherited from ​

ViewBase._setDefaultPaddings


_setupAsRootView() ​

ts
_setupAsRootView(context: any): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
contextany

Returns ​

void

Inherited from ​

ViewBase._setupAsRootView


_setupUI() ​

ts
_setupUI(
   context: any, 
   atIndex?: number, 
   parentIsLoaded?: boolean): void;

Defined in: ui/core/view-base/index.ts

Setups the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.

Parameters ​

ParameterType
contextany
atIndex?number
parentIsLoaded?boolean

Returns ​

void

Inherited from ​

ViewBase._setupUI


_shouldDelayLayout() ​

ts
_shouldDelayLayout(): boolean;

Defined in: ui/core/view-base/index.ts

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

Inherited from ​

ViewBase._shouldDelayLayout


_suspendNativeUpdates() ​

ts
_suspendNativeUpdates(type: SuspendType): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
typeSuspendType

Returns ​

void

Inherited from ​

ViewBase._suspendNativeUpdates


_tearDownUI() ​

ts
_tearDownUI(force?: boolean): void;

Defined in: ui/core/view-base/index.ts

Tears down the UI for ViewBase and all its children recursively. This method should not be overridden by derived views.

Parameters ​

ParameterType
force?boolean

Returns ​

void

Inherited from ​

ViewBase._tearDownUI


addEventListener() ​

ts
addEventListener(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any, 
   once?: boolean): void;

Defined in: data/observable/index.ts

Adds a listener for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringName of the event to attach to.
callback(data: EventData) => voidA function to be called when some of the specified event(s) is raised.
thisArg?anyAn optional parameter which when set will be used as "this" in callback method call.
once?booleanAn optional parameter which when set will cause the event listener to fire once.

Returns ​

void

Inherited from ​

ViewBase.addEventListener


addPseudoClass() ​

ts
protected addPseudoClass(name: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
namestring

Returns ​

void

Unstable ​

A widget can call this method to add a matching css pseudo class.

Inherited from ​

ViewBase.addPseudoClass


bind() ​

ts
bind(options: BindingOptions, source?: Object): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
optionsBindingOptions
source?Object

Returns ​

void

Inherited from ​

ViewBase.bind


callLoaded() ​

ts
callLoaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ViewBase.callLoaded


callUnloaded() ​

ts
callUnloaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ViewBase.callUnloaded


closeModal() ​

ts
closeModal(...args: any[]): void;

Defined in: ui/core/view-base/index.ts

Closes the current modal view that this page is showing.

Parameters ​

ParameterType
...argsany[]

Returns ​

void

Inherited from ​

ViewBase.closeModal


createNativeView() ​

ts
createNativeView(): Object;

Defined in: ui/core/view-base/index.ts

Creates a native view. Returns either android.view.View or UIView.

Returns ​

Object

Inherited from ​

ViewBase.createNativeView


deletePseudoClass() ​

ts
protected deletePseudoClass(name: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
namestring

Returns ​

void

Unstable ​

A widget can call this method to discard matching css pseudo class.

Inherited from ​

ViewBase.deletePseudoClass


destroyNode() ​

ts
destroyNode(forceDestroyChildren?: boolean): void;

Defined in: ui/core/view-base/index.ts

Tears down the UI of a reusable node by making it no longer reusable.

Parameters ​

ParameterTypeDescription
forceDestroyChildren?booleanForce destroy the children (even if they are reusable)

Returns ​

void

See ​

_tearDownUI

Inherited from ​

ViewBase.destroyNode


disposeNativeView() ​

ts
disposeNativeView(): void;

Defined in: ui/core/view-base/index.ts

Clean up references to the native view.

Returns ​

void

Inherited from ​

ViewBase.disposeNativeView


eachChild() ​

ts
eachChild(callback: (child: ViewBase) => boolean): void;

Defined in: ui/core/view-base/index.ts

Iterates over children of type ViewBase.

Parameters ​

ParameterTypeDescription
callback(child: ViewBase) => booleanCalled for each child of type ViewBase. Iteration stops if this method returns falsy value.

Returns ​

void

Inherited from ​

ViewBase.eachChild


ensureDomNode() ​

ts
ensureDomNode(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Unstable ​

Ensures a dom-node for this view.

Inherited from ​

ViewBase.ensureDomNode


get() ​

ts
get(name: string): any;

Defined in: data/observable/index.ts

Gets the value of the specified property.

Parameters ​

ParameterType
namestring

Returns ​

any

Inherited from ​

ViewBase.get


getEffectivePaddingShorthand() ​

ts
getEffectivePaddingShorthand(): string;

Defined in: ui/core/view-base/index.ts

Returns ​

string

Inherited from ​

ViewBase.getEffectivePaddingShorthand


getViewByDomId() ​

ts
getViewByDomId<T>(domId: number): T;

Defined in: ui/core/view-base/index.ts

Returns the child view with the specified domId.

Type Parameters ​

Type Parameter
T extends ViewBase

Parameters ​

ParameterType
domIdnumber

Returns ​

T

Inherited from ​

ViewBase.getViewByDomId


getViewById() ​

ts
getViewById<T>(id: string): T;

Defined in: ui/core/view-base/index.ts

Returns the child view with the specified id.

Type Parameters ​

Type Parameter
T extends ViewBase

Parameters ​

ParameterType
idstring

Returns ​

T

Inherited from ​

ViewBase.getViewById


hasListeners() ​

ts
hasListeners(eventName: string): boolean;

Defined in: data/observable/index.ts

Checks whether a listener is registered for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event to check for.

Returns ​

boolean

Inherited from ​

ViewBase.hasListeners


initNativeView() ​

ts
initNativeView(): void;

Defined in: ui/core/view-base/index.ts

Initializes properties/listeners of the native view.

Returns ​

void

Inherited from ​

ViewBase.initNativeView


loadView() ​

ts
loadView(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Load view.

Parameters ​

ParameterTypeDescription
viewViewBaseto load.

Returns ​

void

Inherited from ​

ViewBase.loadView


notify() ​

ts
notify<T>(data: T): void;

Defined in: data/observable/index.ts

Notify this Observable instance with some data. This causes all event handlers on the Observable instance to be called, as well as any 'global' event handlers set on the instance's class.

Type Parameters ​

Type Parameter
T extends Optional<EventData, "object">

Parameters ​

ParameterTypeDescription
dataTan object that satisfies the EventData interface, though with an optional 'object' property. If left undefined, the 'object' property will implicitly be set as this Observable instance.

Returns ​

void

Inherited from ​

ViewBase.notify


notifyPropertyChange() ​

ts
notifyPropertyChange(
   name: string, 
   value: any, 
   oldValue?: any): void;

Defined in: data/observable/index.ts

Notifies all the registered listeners for the property change event.

Parameters ​

ParameterType
namestring
valueany
oldValue?any

Returns ​

void

Inherited from ​

ViewBase.notifyPropertyChange


off() ​

ts
off(
   eventName: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Removes the listener(s) for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event.
callback?(data: EventData) => voidAn optional specific event listener to remove (if omitted, all event listeners by this name will be removed).
thisArg?anyAn optional parameter which, when set, will be used to refine search of the correct event listener to be removed.

Returns ​

void

Inherited from ​

ViewBase.off


on() ​

ts
on(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Adds a listener for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event.
callback(data: EventData) => voidThe event listener to add. Will be called when an event of the given name is raised.
thisArg?anyAn optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound.

Returns ​

void

Inherited from ​

ViewBase.on


once() ​

ts
once(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Adds a listener for the specified event name, which, once fired, will remove itself.

Parameters ​

ParameterTypeDescription
eventNamestringThe name of the event.
callback(data: EventData) => voidThe event listener to add. Will be called when an event of the given name is raised.
thisArg?anyAn optional parameter which, when set, will be bound as the this context when the callback is called. Falsy values will be not be bound.

Returns ​

void

Inherited from ​

ViewBase.once


onLoaded() ​

ts
onLoaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ViewBase.onLoaded


onResumeNativeUpdates() ​

ts
onResumeNativeUpdates(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ViewBase.onResumeNativeUpdates


onUnloaded() ​

ts
onUnloaded(): void;

Defined in: ui/core/view-base/index.ts

Returns ​

void

Inherited from ​

ViewBase.onUnloaded


removeEventListener() ​

ts
removeEventListener(
   eventName: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Removes listener(s) for the specified event name.

Parameters ​

ParameterTypeDescription
eventNamestringName of the event to attach to.
callback?(data: EventData) => voidAn optional parameter pointing to a specific listener. If not defined, all listeners for the event names will be removed.
thisArg?anyAn optional parameter which when set will be used to refine search of the correct callback which will be removed as event listener.

Returns ​

void

Inherited from ​

ViewBase.removeEventListener


requestLayout() ​

ts
requestLayout(): void;

Defined in: ui/core/view-base/index.ts

Invalidates the layout of the view and triggers a new layout pass.

Returns ​

void

Inherited from ​

ViewBase.requestLayout


resetNativeView() ​

ts
resetNativeView(): void;

Defined in: ui/core/view-base/index.ts

Resets properties/listeners set to the native view.

Returns ​

void

Inherited from ​

ViewBase.resetNativeView


set() ​

ts
set(name: string, value: any): void;

Defined in: ui/core/view-base/index.ts

Updates the specified property with the provided value.

Parameters ​

ParameterType
namestring
valueany

Returns ​

void

Inherited from ​

ViewBase.set


setInlineStyle() ​

ts
setInlineStyle(style: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
stylestring

Returns ​

void

Inherited from ​

ViewBase.setInlineStyle


setNativeView() ​

ts
setNativeView(value: any): void;

Defined in: ui/core/view-base/index.ts

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.

Parameters ​

ParameterType
valueany

Returns ​

void

Inherited from ​

ViewBase.setNativeView


setProperty() ​

ts
setProperty(name: string, value: any): void;

Defined in: data/observable/index.ts

Updates the specified property with the provided value and raises a property change event and a specific change event based on the property name.

Parameters ​

ParameterType
namestring
valueany

Returns ​

void

Inherited from ​

ViewBase.setProperty


showModal() ​

Call Signature ​

ts
showModal(view: ViewBase, modalOptions?: ShowModalOptions): ViewBase;

Defined in: ui/core/view-base/index.ts

Shows the view passed as parameter as a modal view.

Parameters ​
ParameterTypeDescription
viewViewBaseView instance to be shown modally.
modalOptions?ShowModalOptionsA ShowModalOptions instance
Returns ​

ViewBase

Inherited from ​

ViewBase.showModal

Call Signature ​

ts
showModal(moduleName: string, modalOptions?: ShowModalOptions): ViewBase;

Defined in: ui/core/view-base/index.ts

Shows the View contained in moduleName as a modal view.

Parameters ​
ParameterTypeDescription
moduleNamestringThe name of the module to load starting from the application root.
modalOptions?ShowModalOptionsA ShowModalOptions instance
Returns ​

ViewBase

Inherited from ​

ViewBase.showModal


toString() ​

ts
toString(): string;

Defined in: ui/text-base/formatted-string.d.ts:26

A human readable representation of the formatted string.

Returns ​

string

Overrides ​

ViewBase.toString


unbind() ​

ts
unbind(property: string): void;

Defined in: ui/core/view-base/index.ts

Parameters ​

ParameterType
propertystring

Returns ​

void

Inherited from ​

ViewBase.unbind


unloadView() ​

ts
unloadView(view: ViewBase): void;

Defined in: ui/core/view-base/index.ts

Unload view.

Parameters ​

ParameterTypeDescription
viewViewBaseto unload.

Returns ​

void

Inherited from ​

ViewBase.unloadView


addEventListener() ​

ts
static addEventListener(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any, 
   once?: boolean): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any
once?boolean

Returns ​

void

Deprecated ​

Inherited from ​

ViewBase.addEventListener


off() ​

ts
static off(
   eventName: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback?(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

ViewBase.off


on() ​

ts
static on(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any, 
   once?: boolean): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any
once?boolean

Returns ​

void

Deprecated ​

Inherited from ​

ViewBase.on


once() ​

ts
static once(
   eventName: string, 
   callback: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

ViewBase.once


removeEventListener() ​

ts
static removeEventListener(
   eventName: string, 
   callback?: (data: EventData) => void, 
   thisArg?: any): void;

Defined in: data/observable/index.ts

Please avoid using the static event-handling APIs as they will be removed in future.

Parameters ​

ParameterType
eventNamestring
callback?(data: EventData) => void
thisArg?any

Returns ​

void

Deprecated ​

Inherited from ​

ViewBase.removeEventListener

Previous
Font
Next
Frame