A navigation control for displaying a header, back navigation and optional items. More...
Import Statement: | import Felgo 3.0 |
Inherits: |
NavigationBar shows a page title, a back button on the left side and optional NavigationBarItem slots.
This component is automatically instantiated inside NavigationStack, for back navigation.
backButtonItem : Component |
This property defines an item that is shown as back bar button item.
By default a back arrow Icon is provided, which is sufficient in most cases. If you want to customize that icon you can make use of backButtonItemPressed property to define a custom style for the pressed state.
Here is an example of providing your custom item within a NavigationStack:
NavigationStack { id: stack navigationBar.backButtonItem: Text { text: "Back" anchors.centerIn: parent color: stack.navigationBar.backButtonItemPressed ? "red" : "green" } }
See also backButtonItemPressed.
[read-only] backButtonItemPressed : bool |
Use this readonly property to customize the pressed state of a custom provided backButtonItem.
See also backButtonItem.
backButtonVisible : bool |
Holds whether the back button is shown or not. If false, the leftBarItem will appear in the left item slot, if set. If true, the backButton will appear in the left item slot.
backgroundColor : color |
The background color fills the NavigationBar's background.
By default the globally set value from ThemeNavigationBar::backgroundColor is used, which is chosen to match the target platform.
Note: You should only overwrite this value if you want to provide a NavigationStack or NavigationBar in your app that needs a different style than your default one. Otherwise you should use ThemeNavigationBar::backgroundColor for customization.
This property was introduced in Felgo 2.14.2.
backgroundImageFillMode : int |
The fillMode to use for the NavigationBar's background if the backgroundImageSource is set.
If no value is set, the globally set value from ThemeNavigationBar::fillMode is used, which defaults to Image.Tile.
Setting this property to another value might be useful of you don't provide a pattern image as backgroundImageSource.
Note: You should only overwrite this value if you want to add a NavigationStack or NavigationBar in your app that needs a different style than your default one. Otherwise you should use ThemeNavigationBar::backgroundImageFillMode for customization.
This property was introduced in Felgo 2.14.2.
backgroundImageSource : url |
An image source URL to fill the NavigationBar's background, like a pattern image.
If no value is set, the globally set value from ThemeNavigationBar::backgroundImageSource is used, which defaults to an empty image and the NavigationBar only fills with the provided backgroundColor then.
This property is useful if you want to provide a background image like a background pattern for the NavigationBar.
Note: You should only overwrite this value if you want to add a NavigationStack or NavigationBar in your app that needs a different style than your default one. Otherwise you should use ThemeNavigationBar::backgroundImageSource for customization.
This property was introduced in Felgo 2.14.2.
fillMode : enumeration |
The fillMode to use for the NavigationBar's background if the backgroundImageSource is set.
If no value is set, the globally set value from ThemeNavigationBar::fillMode is used, which defaults to Image.Tile.
Setting this property to another value might be useful of you don't provide a pattern image as backgroundImageSource.
Note: You should only overwrite this value if you want to add a NavigationStack or NavigationBar in your app that needs a different style than your default one. Otherwise you should use ThemeNavigationBar::backgroundImageFillMode for customization.
This property was introduced in Felgo 2.14.2.
leftBarItem : NavigationBarItem |
An Item derived from NavigationBarItem to appear in the left item slot. This is only used, when the back button is not shown.
rightBarItem : NavigationBarItem |
An Item derived from NavigationBarItem to appear in the right item slot.
titleItem : Item |
An Item derived from NavigationBarItem to appear in the title slot of the navigation bar.
This property was introduced in Felgo 2.6.2.
Voted #1 for: