FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Page

    struct · ferroui-controls · v0.5.0

    struct Page
    

    Abstract base class for all page types.

    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<Page>
    

    Returns a strong reference to this object.

    Source

    on_navigated_to

    fn on_navigated_to(self: &Self, args: &NavigatedToEventArgs)
    

    Called when the page has been navigated to.

    Source

    on_navigating_from

    fn on_navigating_from(self: &Self, args: &NavigatingFromEventArgs)
    

    Called when the page is about to be navigated from.

    Setting the cancel flag of the args here prevents the Navigating asynchronous handlers from running and aborts the navigation. This method is called before the Navigating event.

    Source

    on_navigated_from

    fn on_navigated_from(self: &Self, args: &NavigatedFromEventArgs)
    

    Called when the page has been navigated from.

    Source

    on_system_back_button_pressed

    fn on_system_back_button_pressed(self: &Self) -> bool
    

    Called when the system back button is pressed. Returns true if the back press was handled.

    Source

    update_content_safe_area_padding

    fn update_content_safe_area_padding(self: &Self)
    

    Called when the safe-area padding changes.

    Source

    update_active_page

    fn update_active_page(self: &Self)
    

    Called when the active child page changes.

    Source

    safe_area_padding_property

    fn safe_area_padding_property() -> &'static StyledProperty<Thickness>
    

    Defines the SafeAreaPadding property.

    Source

    header_property

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

    Defines the Header property.

    Source

    header_template_property

    fn header_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
    

    Defines the HeaderTemplate property.

    Source

    icon_property

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

    Defines the Icon property.

    Source

    icon_template_property

    fn icon_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
    

    Defines the IconTemplate property.

    Source

    current_page_property

    fn current_page_property() -> &'static StyledProperty<Option<Ref<Page>>>
    

    Defines the CurrentPage property.

    Source

    is_in_navigation_page_property

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

    Defines the IsInNavigationPage property.

    Source

    navigation_property

    fn navigation_property() -> &'static DirectProperty<Page, Option<Rc<dyn INavigation>>>
    

    Defines the Navigation property.

    Source

    page_navigation_system_back_button_pressed_event

    fn page_navigation_system_back_button_pressed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the routed event raised when the system back button is pressed.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    header

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

    The header content displayed in the navigation bar or tab strip.

    Source

    set_header

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

    Source

    header_template

    fn header_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
    

    The data template used to display the header.

    Source

    set_header_template

    fn set_header_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
    

    Source

    icon

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

    The icon displayed alongside the page header.

    Source

    set_icon

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

    Source

    icon_template

    fn icon_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
    

    The data template used to display the icon.

    Source

    set_icon_template

    fn set_icon_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
    

    Source

    safe_area_padding

    fn safe_area_padding(self: &Self) -> Thickness
    

    The safe-area padding applied to this page's content.

    Source

    set_safe_area_padding

    fn set_safe_area_padding(self: &Self, value: Thickness)
    

    Source

    current_page

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

    The currently active child page.

    Source

    set_current_page

    fn set_current_page(self: &Self, value: impl Into<Nullable<Page>>)
    

    Source

    navigation

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

    The navigation service provided by the parent navigation page.

    Source

    set_navigation

    fn set_navigation(self: &Self, value: Option<Rc<dyn INavigation>>)
    

    Source

    is_in_navigation_page

    fn is_in_navigation_page(self: &Self) -> bool
    

    Whether this page is currently hosted inside a navigation page.

    Source

    set_is_in_navigation_page

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

    Source

    page_navigation_system_back_button_pressed

    fn page_navigation_system_back_button_pressed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Raised when the system back button is pressed while this page is active.

    Source

    navigated_to

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

    Occurs when the page has been navigated to.

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

    Source

    navigating

    fn navigating(self: &Self, handler: impl Fn(&NavigatingFromEventArgs) -> NavigatingTask + 'static) -> Subscription
    

    Occurs when the page is about to be navigated from.

    Each subscriber is awaited in turn. Set the cancel flag of the args to abort the navigation; remaining subscribers are not invoked once cancellation is requested. If a subscriber panics, the panic propagates to the task of the calling navigation method (such as the push of a navigation page) and the navigation is aborted.

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

    Source

    navigated_from

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

    Occurs when the page has been navigated from.

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

    Source

    Trait implementations

    Availability

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