FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FramePage

    struct · ferroui-controls · v0.5.0

    struct FramePage
    

    A page a Frame navigates to (WinUI's Page, a UserControl).

    The name keeps Page for the upstream page of ferroui-controls (crate::Page, a templated control with asynchronous navigation); the two navigation models are separate (docs/porting/winui-controls.md, section 7). A derived page overrides the callbacks of FramePageImpl (on_navigated_to, on_navigating_from, on_navigated_from), which the frame calls synchronously. The page is styled as a UserControl (WinUI's Page has no style of its own).

    Missing (docs/porting/winui-controls.md, section 10.4): TopAppBar, BottomAppBar and the navigation transitions of the page.

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

    Returns a strong reference to this object.

    Source

    on_navigating_from

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

    Called before the frame navigates away from the page (WinUI's OnNavigatingFrom); args.set_cancel(true) cancels the navigation.

    Source

    on_navigated_from

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

    Called after the frame navigated away from the page (WinUI's OnNavigatedFrom).

    Source

    on_navigated_to

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

    Called after the frame navigated to the page (WinUI's OnNavigatedTo).

    Source

    navigation_cache_mode_property

    fn navigation_cache_mode_property() -> &'static StyledProperty<NavigationCacheMode>
    

    Defines the NavigationCacheMode property: whether the frame keeps the page to show it again. Disabled by default.

    Source

    frame_property

    fn frame_property() -> &'static DirectProperty<FramePage, Option<Ref<Frame>>>
    

    Defines the Frame property: the frame that shows the page (read-only).

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a page.

    Source

    navigation_cache_mode

    fn navigation_cache_mode(self: &Self) -> NavigationCacheMode
    

    Gets whether the frame keeps the page to show it again.

    Source

    set_navigation_cache_mode

    fn set_navigation_cache_mode(self: &Self, mode: NavigationCacheMode)
    

    Sets whether the frame keeps the page to show it again.

    Source

    frame

    fn frame(self: &Self) -> Option<Ref<Frame>>
    

    Gets the frame that shows the page, held weakly, so that a page in the content or the cache of a frame keeps no cycle.

    Source

    Trait implementations

    Availability

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