返回介绍

NavigationView

发布于 2020-10-20 06:58:13 字数 10717 浏览 902 评论 0 收藏 0

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

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.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文