NavigationView
Extends Composite
A widget that displays a stack of pages with a toolbar that allows to navigate back. The toolbar also displays the current page’s title and the highest priority actions that are added to the NavigationView. Only children of type Page
, Action
and Search Action
are supported. Since the NavigationView does not compute its own size, the width and height must be defined by the respective layout properties (e.g. either width
or left
and right
must be specified).
Import this type with “const {NavigationView} = require('tabris');
”
Methods
pages(selector)
Parameters:
- selector: Selector [Optional]
- a selector expression or a predicate function to filter the results.
Returns: WidgetCollection
Returns the ordered list of pages on the page stack, with the bottommost page as the first and the topmost page as the last element. Same as children(), but only returns children that are of type Page
.
Properties
actionColor
Type: Color
The color used for action icons.
actionTextColor
AndroidWindows 10
Type: Color
The color used for action texts. Only applied on Android and Windows. IOS uses the actionColor
to colorize the action text.
bottomToolbarHeight
Type: number
The height of the bottom toolbar. Is 0 if not visible or unsupported by the platform.
drawer ActionVisible
Type: boolean
Whether to display the so-called “Burger menu” to open the drawer.
pageAnimation
Type: string, supported values: default
, none
, default: default
Controls what animation to use when animating a page transition.
titleTextColor
Type: Color
The text color used for page titles.
toolbarColor
Type: Color
The background color of the toolbar.
toolbarVisible
Type: boolean, default: true
Whether the toolbar is visible.
topToolbarHeight
Type: number
The height of the top toolbar. Is 0 if not visible.
win_drawer ActionBackground
Windows 10
Type: Color
The background color used for the drawer action. It is common to the make this the same color as the splash screen. Available only on Windows.
win_drawer ActionTheme
Windows 10
Type: string, supported values: light
, dark
, default
, default: default
Controls the color scheme used for the drawer action. When set to "default"
the theme is inherited from the NavigationView. Available only on Windows.
win_toolbarOverflowTheme
Windows 10
Type: string, supported values: light
, dark
, default
, default: default
Controls the color scheme used for the toolbar’s overflow menu. When set to "default"
the theme is inherited from the toolbar. Available only on Windows.
win_toolbarTheme
Windows 10
Type: string, supported values: light
, dark
, default
, default: default
Controls the color scheme used for the toolbar. When set to "default"
the theme is inherited from the NavigationView. Available only on Windows.
Events
actionColorChanged
Fired when the actionColor property has changed.
Event Parameters
target: this The widget the event was fired on.
value: Color The new value of actionColor.
actionTextColorChanged
Fired when the actionTextColor property has changed.
Event Parameters
target: this The widget the event was fired on.
value: Color The new value of actionTextColor.
bottomToolbarHeightChanged
Fired when the height of the bottom toolbar changes, e.g. if it changes visibility.
Event Parameters
target: this The widget the event was fired on.
value: number The new value of bottomToolbarHeight.
drawer ActionVisibleChanged
Fired when the drawer ActionVisible property has changed.
Event Parameters
target: this The widget the event was fired on.
value: boolean The new value of drawer ActionVisible.
pageAnimationChanged
Fired when the pageAnimation property has changed.
Event Parameters
target: this The widget the event was fired on.
value: string The new value of pageAnimation.
titleTextColorChanged
Fired when the titleTextColor property has changed.
Event Parameters
target: this The widget the event was fired on.
value: Color The new value of titleTextColor.
toolbarColorChanged
Fired when the toolbarColor property has changed.
Event Parameters
target: this The widget the event was fired on.
value: Color The new value of toolbarColor.
toolbarVisibleChanged
Fired when the toolbarVisible property has changed.
Event Parameters
target: this The widget the event was fired on.
value: boolean The new value of toolbarVisible.
topToolbarHeightChanged
Fired when the height of the top toolbar changes, e.g. if it changes visibility.
Event Parameters
target: this The widget the event was fired on.
value: number The new value of topToolbarHeight.
win_drawerActionBackgroundChanged
Fired when the win_drawerActionBackground property has changed.
Event Parameters
target: this The widget the event was fired on.
value: Color The new value of win_drawerActionBackground.
win_drawerActionThemeChanged
Fired when the win_drawerActionTheme property has changed.
Event Parameters
target: this The widget the event was fired on.
value: string The new value of win_drawerActionTheme.
win_toolbarOverflowThemeChanged
Fired when the win_toolbarOverflowTheme property has changed.
Event Parameters
target: this The widget the event was fired on.
value: string The new value of win_toolbarOverflowTheme.
win_toolbarThemeChanged
Fired when the win_toolbarTheme property has changed.
Event Parameters
target: this The widget the event was fired on.
value: string The new value of win_toolbarTheme.