Class “Page”
Object > NativeObject > Widget > Composite > Page
A container representing a single page of a NavigationView widget.
Type: | Page extends Composite |
Constructor: | public |
Singleton: | No |
Namespace: | tabris |
Direct subclasses: | None |
JSX Support: | Element: <Page/> Parent Elements: <NavigationView/> Child Elements: Any standalone widget element |
Examples
JavaScript
import {NavigationView, Page, contentView} from 'tabris';
new NavigationView({layoutData: 'stretch'})
.append(new Page({title: 'Albums'}))
.appendTo(contentView);
See also:
JSX Creating a stack of pages [► Run in Playground]
Constructor
new Page(properties?)
Parameter | Type | Description |
---|---|---|
properties | Properties<Page> |
Sets all key-value pairs in the properties object as widget properties. Optional. |
Properties
autoDispose
Defines whether this page will be automatically disposed when popped from the NavigationView, e.g. using native back navigation.
Type: | boolean |
Default: | true |
Settable: | Yes |
Change Event: | autoDisposeChanged |
image
An image to be displayed in the navigation bar
Type: | ImageValue |
Settable: | Yes |
Change Event: | imageChanged |
title
The page title to be displayed in the navigation bar.
Type: | string |
Settable: | Yes |
Change Event: | titleChanged |
Events
appear
Fired when the page is about to become visible, i.e. it has become the active page.
EventObject Type: EventObject<Page>
This event has no additional parameter.
disappear
Fired when the page is no longer visible, i.e. another page has become the active page.
EventObject Type: EventObject<Page>
This event has no additional parameter.
Change Events
imageChanged
Fired when the image property has changed.
EventObject Type: PropertyChangedEvent<Page, ImageValue>
Property | Type | Description |
---|---|---|
value | ImageValue |
The new value of image. |
titleChanged
Fired when the title property has changed.
EventObject Type: PropertyChangedEvent<Page, string>
Property | Type | Description |
---|---|---|
value | string |
The new value of title. |
autoDisposeChanged
Fired when the autoDispose property has changed.
EventObject Type: PropertyChangedEvent<Page, boolean>
Property | Type | Description |
---|---|---|
value | boolean |
The new value of autoDispose. |