Logo FluentUI

PageRouterView QML Type

A stack view controlled by a PageRouter. More...

Import Statement: import FluentUI.Controls 1.0

Properties

Signals

Methods

  • void pop()
  • void push(url url, var properties)
  • void replace(url url, var properties)

Detailed Description

PageRouterView displays pages managed by a PageRouter using a stack-based navigation model. It supports pushing, popping, and replacing pages while maintaining a navigation history. The current page and stack depth are exposed as properties.

Usage Example

 import QtQuick
 import FluentUI.Controls

 PageRouterView {
     id: view
     router: pageRouter
     anchors.fill: parent
 }

Property Documentation

currentItem : Item

The currently displayed page item. Read-only.

depth : int

The current depth of the navigation stack. A value of 1 indicates the root page. Read-only.

router : PageRouter

The PageRouter that provides route resolution for this view.

Signal Documentation

void currentItemChanged()

Emitted when the current displayed page changes due to push, pop, or replace operations.

Note: The corresponding handler is onCurrentItemChanged.

Method Documentation

void pop()

Pops the current page from the stack and navigates back to the previous page.

void push(url url, var properties)

Pushes a new page onto the stack. The url is resolved through the router, and properties are applied to the newly created page.

void replace(url url, var properties)

Replaces the current page on the stack without changing the stack depth. The url is resolved through the router, and properties are applied.