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.
Members
TYPEto_refon_navigating_fromon_navigated_fromon_navigated_tonavigation_cache_mode_propertyframe_propertyconstructnewnavigation_cache_modeset_navigation_cache_modeframe
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<FramePage>
Returns a strong reference to this object.
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.
on_navigated_from
fn on_navigated_from(self: &Self, args: &NavigationEventArgs)
Called after the frame navigated away from the page (WinUI's OnNavigatedFrom).
on_navigated_to
fn on_navigated_to(self: &Self, args: &NavigationEventArgs)
Called after the frame navigated to the page (WinUI's OnNavigatedTo).
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.
frame_property
fn frame_property() -> &'static DirectProperty<FramePage, Option<Ref<Frame>>>
Defines the Frame property: the frame that shows the page (read-only).
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a page.
navigation_cache_mode
fn navigation_cache_mode(self: &Self) -> NavigationCacheMode
Gets whether the frame keeps the page to show it again.
set_navigation_cache_mode
fn set_navigation_cache_mode(self: &Self, mode: NavigationCacheMode)
Sets whether the frame keeps the page to show it again.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtContentControlImplExtControlImplExtFramePageImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<FramePage>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleVisualImplLayoutableImplInteractiveImplInputElementImplControlImplTemplatedControlImplContentControlImplStyledElementImplFerroObjectImplFramePageImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.