FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    NavigationPage

    struct · ferroui-controls · v0.5.0

    struct NavigationPage
    

    A navigation page that supports simple stack-based navigation.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<NavigationPage>
    

    Returns a strong reference to this object.

    Source

    push_async_task

    fn push_async_task(self: &Self, page: impl IntoRef<Page>) -> DispatcherTask<()>
    

    The deprecated form of push_async: a DispatcherTask.

    Deprecated since 0.5.0. use push_async, which gives a JoinHandle

    Source

    push_async_with_transition_task

    fn push_async_with_transition_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<()>
    

    The deprecated form of push_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use push_async_with_transition, which gives a JoinHandle

    Source

    push_async_with_parameter_task

    fn push_async_with_parameter_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>, parameter: Option<BoxedValue>) -> DispatcherTask<()>
    

    The deprecated form of push_async_with_parameter: a DispatcherTask.

    Deprecated since 0.5.0. use push_async_with_parameter, which gives a JoinHandle

    Source

    pop_async_task

    fn pop_async_task(self: &Self) -> DispatcherTask<Option<Ref<Page>>>
    

    The deprecated form of pop_async: a DispatcherTask.

    Deprecated since 0.5.0. use pop_async, which gives a JoinHandle

    Source

    pop_async_with_transition_task

    fn pop_async_with_transition_task(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<Option<Ref<Page>>>
    

    The deprecated form of pop_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use pop_async_with_transition, which gives a JoinHandle

    Source

    pop_to_root_async_task

    fn pop_to_root_async_task(self: &Self) -> DispatcherTask<()>
    

    The deprecated form of pop_to_root_async: a DispatcherTask.

    Deprecated since 0.5.0. use pop_to_root_async, which gives a JoinHandle

    Source

    pop_to_root_async_with_transition_task

    fn pop_to_root_async_with_transition_task(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<()>
    

    The deprecated form of pop_to_root_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use pop_to_root_async_with_transition, which gives a JoinHandle

    Source

    pop_to_page_async_task

    fn pop_to_page_async_task(self: &Self, page: impl IntoRef<Page>) -> DispatcherTask<()>
    

    The deprecated form of pop_to_page_async: a DispatcherTask.

    Deprecated since 0.5.0. use pop_to_page_async, which gives a JoinHandle

    Source

    pop_to_page_async_with_transition_task

    fn pop_to_page_async_with_transition_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<()>
    

    The deprecated form of pop_to_page_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use pop_to_page_async_with_transition, which gives a JoinHandle

    Source

    replace_async_task

    fn replace_async_task(self: &Self, page: impl IntoRef<Page>) -> DispatcherTask<()>
    

    The deprecated form of replace_async: a DispatcherTask.

    Deprecated since 0.5.0. use replace_async, which gives a JoinHandle

    Source

    replace_async_with_transition_task

    fn replace_async_with_transition_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<()>
    

    The deprecated form of replace_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use replace_async_with_transition, which gives a JoinHandle

    Source

    replace_async_with_parameter_task

    fn replace_async_with_parameter_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>, parameter: Option<BoxedValue>) -> DispatcherTask<()>
    

    The deprecated form of replace_async_with_parameter: a DispatcherTask.

    Deprecated since 0.5.0. use replace_async_with_parameter, which gives a JoinHandle

    Source

    push_modal_async_task

    fn push_modal_async_task(self: &Self, page: impl IntoRef<Page>) -> DispatcherTask<()>
    

    The deprecated form of push_modal_async: a DispatcherTask.

    Deprecated since 0.5.0. use push_modal_async, which gives a JoinHandle

    Source

    push_modal_async_with_transition_task

    fn push_modal_async_with_transition_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<()>
    

    The deprecated form of push_modal_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use push_modal_async_with_transition, which gives a JoinHandle

    Source

    push_modal_async_with_parameter_task

    fn push_modal_async_with_parameter_task(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>, parameter: Option<BoxedValue>) -> DispatcherTask<()>
    

    The deprecated form of push_modal_async_with_parameter: a DispatcherTask.

    Deprecated since 0.5.0. use push_modal_async_with_parameter, which gives a JoinHandle

    Source

    pop_modal_async_task

    fn pop_modal_async_task(self: &Self) -> DispatcherTask<Option<Ref<Page>>>
    

    The deprecated form of pop_modal_async: a DispatcherTask.

    Deprecated since 0.5.0. use pop_modal_async, which gives a JoinHandle

    Source

    pop_modal_async_with_transition_task

    fn pop_modal_async_with_transition_task(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<Option<Ref<Page>>>
    

    The deprecated form of pop_modal_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use pop_modal_async_with_transition, which gives a JoinHandle

    Source

    pop_all_modals_async_task

    fn pop_all_modals_async_task(self: &Self) -> DispatcherTask<()>
    

    The deprecated form of pop_all_modals_async: a DispatcherTask.

    Deprecated since 0.5.0. use pop_all_modals_async, which gives a JoinHandle

    Source

    pop_all_modals_async_with_transition_task

    fn pop_all_modals_async_with_transition_task(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> DispatcherTask<()>
    

    The deprecated form of pop_all_modals_async_with_transition: a DispatcherTask.

    Deprecated since 0.5.0. use pop_all_modals_async_with_transition, which gives a JoinHandle

    Source

    content_property

    fn content_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the Content property.

    Source

    page_transition_property

    fn page_transition_property() -> &'static StyledProperty<Option<Rc<dyn IPageTransition>>>
    

    Defines the PageTransition property.

    Source

    modal_transition_property

    fn modal_transition_property() -> &'static StyledProperty<Option<Rc<dyn IPageTransition>>>
    

    Defines the ModalTransition property.

    Source

    is_back_button_effectively_visible_property

    fn is_back_button_effectively_visible_property() -> &'static DirectProperty<NavigationPage, bool>
    

    Defines the IsBackButtonEffectivelyVisible property.

    Source

    bar_layout_behavior_property

    fn bar_layout_behavior_property() -> &'static AttachedProperty<Option<BarLayoutBehavior>>
    

    Defines the BarLayoutBehavior attached property.

    Source

    has_shadow_property

    fn has_shadow_property() -> &'static StyledProperty<bool>
    

    Defines the HasShadow property.

    Source

    bar_height_property

    fn bar_height_property() -> &'static StyledProperty<f64>
    

    Defines the BarHeight property.

    Source

    bar_height_override_property

    fn bar_height_override_property() -> &'static AttachedProperty<Option<f64>>
    

    Defines the BarHeightOverride attached property.

    Source

    effective_bar_height_property

    fn effective_bar_height_property() -> &'static DirectProperty<NavigationPage, f64>
    

    Defines the EffectiveBarHeight property.

    Source

    back_button_content_property

    fn back_button_content_property() -> &'static AttachedProperty<Option<BoxedValue>>
    

    Defines the BackButtonContent attached property.

    Source

    has_back_button_property

    fn has_back_button_property() -> &'static AttachedProperty<bool>
    

    Defines the HasBackButton attached property.

    Source

    is_back_button_visible_property

    fn is_back_button_visible_property() -> &'static StyledProperty<bool>
    

    Defines the IsBackButtonVisible property.

    Source

    top_command_bar_property

    fn top_command_bar_property() -> &'static AttachedProperty<Option<Ref<Control>>>
    

    Defines the TopCommandBar attached property.

    Source

    bottom_command_bar_property

    fn bottom_command_bar_property() -> &'static AttachedProperty<Option<Ref<Control>>>
    

    Defines the BottomCommandBar attached property.

    Source

    has_navigation_bar_property

    fn has_navigation_bar_property() -> &'static AttachedProperty<bool>
    

    Defines the HasNavigationBar attached property.

    Source

    is_gesture_enabled_property

    fn is_gesture_enabled_property() -> &'static StyledProperty<bool>
    

    Defines the IsGestureEnabled property.

    Source

    is_navigating_property

    fn is_navigating_property() -> &'static DirectProperty<NavigationPage, bool>
    

    Defines the IsNavigating property.

    Source

    can_go_back_property

    fn can_go_back_property() -> &'static DirectProperty<NavigationPage, bool>
    

    Defines the CanGoBack property.

    Source

    is_back_button_enabled_property

    fn is_back_button_enabled_property() -> &'static AttachedProperty<bool>
    

    Defines the IsBackButtonEnabled attached property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Initializes a new instance of the navigation page.

    Source

    as_navigation

    fn as_navigation(self: &Self) -> Rc<dyn INavigation>
    

    The navigation page as the navigation service of the pages it hosts.

    Source

    page_transition

    fn page_transition(self: &Self) -> Option<Rc<dyn IPageTransition>>
    

    The transition used when pushing or popping pages.

    Source

    set_page_transition

    fn set_page_transition(self: &Self, value: Option<Rc<dyn IPageTransition>>)
    

    Source

    modal_transition

    fn modal_transition(self: &Self) -> Option<Rc<dyn IPageTransition>>
    

    The transition used when presenting or dismissing modal pages.

    Source

    set_modal_transition

    fn set_modal_transition(self: &Self, value: Option<Rc<dyn IPageTransition>>)
    

    Source

    is_back_button_effectively_visible

    fn is_back_button_effectively_visible(self: &Self) -> bool
    

    The effective back-button visibility.

    Source

    content

    fn content(self: &Self) -> Option<BoxedValue>
    

    The root page of the navigation stack.

    Source

    set_content

    fn set_content(self: &Self, value: Option<BoxedValue>)
    

    Source

    has_shadow

    fn has_shadow(self: &Self) -> bool
    

    Whether the navigation bar has a shadow.

    Source

    set_has_shadow

    fn set_has_shadow(self: &Self, value: bool)
    

    Source

    bar_height

    fn bar_height(self: &Self) -> f64
    

    The height of the navigation bar.

    Source

    set_bar_height

    fn set_bar_height(self: &Self, value: f64)
    

    Source

    effective_bar_height

    fn effective_bar_height(self: &Self) -> f64
    

    The effective navigation bar height.

    Source

    is_back_button_visible

    fn is_back_button_visible(self: &Self) -> bool
    

    Whether the back button is globally visible for this navigation page.

    Source

    set_is_back_button_visible

    fn set_is_back_button_visible(self: &Self, value: bool)
    

    Source

    is_gesture_enabled

    fn is_gesture_enabled(self: &Self) -> bool
    

    Whether edge-swipe gestures can be used to navigate back.

    Source

    set_is_gesture_enabled

    fn set_is_gesture_enabled(self: &Self, value: bool)
    

    Source

    is_navigating

    fn is_navigating(self: &Self) -> bool
    

    Whether a navigation operation is currently in progress.

    Source

    can_go_back

    fn can_go_back(self: &Self) -> bool
    

    Whether the navigation stack has more than one entry.

    Source

    navigation_stack

    fn navigation_stack(self: &Self) -> Rc<Vec<Ref<Page>>>
    

    The current navigation stack as a read-only list: the root page first, the visible page last. The same list is returned until the stack changes.

    Source

    modal_stack

    fn modal_stack(self: &Self) -> Rc<Vec<Ref<Page>>>
    

    The current modal stack. Index 0 is the oldest (bottom-most) modal; the last index is the most recently pushed (topmost) modal.

    Source

    stack_depth

    fn stack_depth(self: &Self) -> i32
    

    The number of pages in the navigation stack.

    Source

    get_back_button_content

    fn get_back_button_content(page: &Page) -> Option<BoxedValue>
    

    Gets the custom back-button content for the specified page.

    Source

    set_back_button_content

    fn set_back_button_content(page: &Page, content: Option<BoxedValue>)
    

    Sets custom content for the back button on the specified page.

    Source

    get_has_back_button

    fn get_has_back_button(page: &Page) -> bool
    

    Gets whether the back button is visible for the specified page.

    Source

    set_has_back_button

    fn set_has_back_button(page: &Page, value: bool)
    

    Sets whether the back button is visible for the specified page.

    Source

    get_header

    fn get_header(page: &Page) -> Option<BoxedValue>
    

    Gets the header of the specified page.

    Source

    set_header

    fn set_header(page: &Page, header: Option<BoxedValue>)
    

    Sets the header of the specified page.

    Source

    get_top_command_bar

    fn get_top_command_bar(page: &Page) -> Option<Ref<Control>>
    

    Gets the top command bar assigned to the specified page.

    Source

    set_top_command_bar

    fn set_top_command_bar(page: &Page, command_bar: impl Into<Nullable<Control>>)
    

    Sets a top command bar for the specified page.

    Source

    get_bottom_command_bar

    fn get_bottom_command_bar(page: &Page) -> Option<Ref<Control>>
    

    Gets the bottom command bar assigned to the specified page.

    Source

    set_bottom_command_bar

    fn set_bottom_command_bar(page: &Page, command_bar: impl Into<Nullable<Control>>)
    

    Sets a bottom command bar for the specified page.

    Source

    get_has_navigation_bar

    fn get_has_navigation_bar(page: &Page) -> bool
    

    Gets whether the navigation bar is visible for the specified page.

    Source

    set_has_navigation_bar

    fn set_has_navigation_bar(page: &Page, value: bool)
    

    Sets whether the navigation bar is visible for the specified page.

    Source

    get_bar_layout_behavior

    fn get_bar_layout_behavior(page: &Page) -> Option<BarLayoutBehavior>
    

    Gets the bar layout behavior for the specified page.

    Source

    set_bar_layout_behavior

    fn set_bar_layout_behavior(page: &Page, value: Option<BarLayoutBehavior>)
    

    Sets the bar layout behavior for the specified page.

    Source

    get_bar_height_override

    fn get_bar_height_override(page: &Page) -> Option<f64>
    

    Gets the per-page navigation bar height override for the specified page.

    Source

    set_bar_height_override

    fn set_bar_height_override(page: &Page, value: Option<f64>)
    

    Sets the per-page navigation bar height override.

    Source

    get_is_back_button_enabled

    fn get_is_back_button_enabled(page: &Page) -> bool
    

    Gets whether the back button is enabled for the specified page.

    Source

    set_is_back_button_enabled

    fn set_is_back_button_enabled(page: &Page, value: bool)
    

    Sets whether the back button is enabled for the specified page.

    Source

    pushed

    fn pushed(self: &Self, handler: impl Fn(&NavigationEventArgs) -> () + 'static) -> Subscription
    

    Occurs when a page is pushed onto the navigation stack.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    popped

    fn popped(self: &Self, handler: impl Fn(&NavigationEventArgs) -> () + 'static) -> Subscription
    

    Occurs when a page is popped from the navigation stack.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    popped_to_root

    fn popped_to_root(self: &Self, handler: impl Fn(&NavigationEventArgs) -> () + 'static) -> Subscription
    

    Occurs when the stack is popped to root.

    The page of the args is the root page that is now current, not any of the pages that were popped. To observe each popped page individually, subscribe to popped.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    page_inserted

    fn page_inserted(self: &Self, handler: impl Fn(&PageInsertedEventArgs) -> () + 'static) -> Subscription
    

    Occurs when a page has been inserted into the navigation stack.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    page_removed

    fn page_removed(self: &Self, handler: impl Fn(&PageRemovedEventArgs) -> () + 'static) -> Subscription
    

    Occurs when a page has been removed from the navigation stack.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    modal_pushed

    fn modal_pushed(self: &Self, handler: impl Fn(&ModalPushedEventArgs) -> () + 'static) -> Subscription
    

    Occurs when a modal page is pushed.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    modal_popped

    fn modal_popped(self: &Self, handler: impl Fn(&ModalPoppedEventArgs) -> () + 'static) -> Subscription
    

    Occurs when a modal page is popped.

    Dropping the returned guard removes the handler; Subscription::detach keeps it for the life of the page.

    Source

    push_async

    fn push_async(self: &Self, page: impl IntoRef<Page>) -> JoinHandle<()>
    

    Pushes page onto the navigation stack asynchronously using the page transition of the navigation page.

    If a navigation transition is already in progress, the call returns immediately without pushing the page and without raising any events. If a Navigating handler of the outgoing page cancels, the push is silently aborted: the stack is not modified, no events are raised, and nothing panics.

    Source

    push_async_with_transition

    fn push_async_with_transition(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<()>
    

    Pushes page onto the navigation stack asynchronously using transition.

    Source

    push_async_with_parameter

    fn push_async_with_parameter(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>, parameter: Option<BoxedValue>) -> JoinHandle<()>
    

    Pushes page onto the navigation stack asynchronously using transition, with an optional parameter.

    Source

    pop_async

    fn pop_async(self: &Self) -> JoinHandle<Option<Ref<Page>>>
    

    Pops the top page from the navigation stack asynchronously using the page transition of the navigation page.

    The result is None if the stack has only the root page or if a navigation transition is already in progress.

    Source

    pop_async_with_transition

    fn pop_async_with_transition(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<Option<Ref<Page>>>
    

    Pops the top page from the navigation stack asynchronously using transition.

    Source

    pop_to_root_async

    fn pop_to_root_async(self: &Self) -> JoinHandle<()>
    

    Pops all pages to the root page using the page transition of the navigation page.

    If a navigation transition is already in progress, the call returns immediately without modifying the stack and without raising any events.

    Source

    pop_to_root_async_with_transition

    fn pop_to_root_async_with_transition(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<()>
    

    Pops all pages to the root page using transition.

    Source

    pop_to_page_async

    fn pop_to_page_async(self: &Self, page: impl IntoRef<Page>) -> JoinHandle<()>
    

    Pops to a specific page in the stack using the page transition of the navigation page.

    All pages above page are removed from the stack. Each removed page is navigated from with NavigationType::Pop, and the popped event is raised for each one. The target page is navigated to with NavigationType::Pop. If page is already the top of the stack the method returns immediately without raising any events.

    If a navigation transition is already in progress, the call returns immediately without modifying the stack and without raising any events.

    The task fails when page is not in the navigation stack.

    Source

    pop_to_page_async_with_transition

    fn pop_to_page_async_with_transition(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<()>
    

    Pops all pages above page using transition.

    Source

    push_modal_async

    fn push_modal_async(self: &Self, page: impl IntoRef<Page>) -> JoinHandle<()>
    

    Pushes a modal page using the modal transition of the navigation page.

    If a navigation transition is already in progress, the call returns immediately without pushing the page and without raising any events.

    Source

    push_modal_async_with_transition

    fn push_modal_async_with_transition(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<()>
    

    Pushes page as a modal page using transition.

    Source

    push_modal_async_with_parameter

    fn push_modal_async_with_parameter(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>, parameter: Option<BoxedValue>) -> JoinHandle<()>
    

    Pushes page as a modal page using transition, with an optional parameter.

    Source

    pop_modal_async

    fn pop_modal_async(self: &Self) -> JoinHandle<Option<Ref<Page>>>
    

    Pops the top modal page using the modal transition of the navigation page.

    The result is None if there are no modal pages or if a navigation transition is already in progress.

    Source

    pop_modal_async_with_transition

    fn pop_modal_async_with_transition(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<Option<Ref<Page>>>
    

    Pops the top modal page using transition.

    Source

    pop_all_modals_async

    fn pop_all_modals_async(self: &Self) -> JoinHandle<()>
    

    Pops all modal pages using the modal transition of the navigation page.

    All modals are dismissed in a single transition rather than one-by-one, so lifecycle events differ from popping the modals in a loop:

    • The Navigating event is consulted only on the topmost modal. Intermediate modals do not receive a cancellation opportunity. If the top modal cancels, the entire dismiss is aborted and no modals are popped.
    • Every dismissed modal is navigated from, in LIFO order.
    • Only the current page is navigated to.

    Source

    pop_all_modals_async_with_transition

    fn pop_all_modals_async_with_transition(self: &Self, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<()>
    

    Pops all modal pages using transition.

    Source

    remove_page

    fn remove_page(self: &Self, page: impl IntoRef<Page>)
    

    Removes a page from the navigation stack without animation.

    If a navigation transition is already in progress, this call is a no-op: the page is not removed and no events are raised.

    Source

    insert_page

    fn insert_page(self: &Self, page: impl IntoRef<Page>, before: impl IntoRef<Page>)
    

    Inserts a page into the stack before the specified page.

    If a navigation transition is already in progress, this call is a no-op: the page is not inserted and no events are raised.

    Panics

    Panics when before is not in the navigation stack, or page is already hosted by this navigation page.

    Source

    replace_async

    fn replace_async(self: &Self, page: impl IntoRef<Page>) -> JoinHandle<()>
    

    Replaces the top page with page using the page transition of the navigation page.

    If a navigation transition is already in progress, the call returns immediately without modifying the stack and without raising any events.

    Source

    replace_async_with_transition

    fn replace_async_with_transition(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>) -> JoinHandle<()>
    

    Replaces the top page with page using transition.

    Source

    replace_async_with_parameter

    fn replace_async_with_parameter(self: &Self, page: impl IntoRef<Page>, transition: Option<Rc<dyn IPageTransition>>, parameter: Option<BoxedValue>) -> JoinHandle<()>
    

    Replaces the top page with page using transition, with an optional parameter.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.