RoutedViewHost
struct · ferroui-reactiveui-controls · v0.5.0
struct RoutedViewHost
Hosts the view associated with the current ReactiveUI routing state (RoutedViewHost).
ReactiveUI routing consists of an IScreen containing a RoutingState, several
IRoutableViewModels, and a platform-specific RoutedViewHost control. The routing state
manages the view-model navigation stack; the host monitors that state and embeds the view for
the current view model. Bind IScreen.Router to router in a view whose view
model implements IScreen.
See the ReactiveUI routing documentation, https://reactiveui.net/docs/handbook/routing/.
Members
TYPEto_refrouter_propertyview_contract_propertydefault_content_propertyconstructnewrouterset_routerview_contractset_view_contractdefault_contentset_default_contentview_locatorset_view_locatornavigate_to_view_modeldispose_navigation_disposables
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<RoutedViewHost>
Returns a strong reference to this object.
router_property
fn router_property() -> &'static StyledProperty<Option<Rc<RoutingState>>>
Identifies the Router property (RouterProperty).
view_contract_property
fn view_contract_property() -> &'static StyledProperty<Option<String>>
Identifies the ViewContract property (ViewContractProperty).
default_content_property
fn default_content_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the DefaultContent property (DefaultContentProperty), the one of
ViewModelViewHost with this owner added.
construct
fn construct() -> Self
Field initialisation.
new
fn new() -> Ref<Self>
Creates the host.
router
fn router(self: &Self) -> Option<Rc<RoutingState>>
The current routing state (Router).
set_router
fn set_router(self: &Self, value: Option<Rc<RoutingState>>)
Sets the routing state to follow.
view_contract
fn view_contract(self: &Self) -> Option<String>
The contract of the views to resolve (ViewContract).
set_view_contract
fn set_view_contract(self: &Self, value: Option<String>)
Sets the contract of the views to resolve.
default_content
fn default_content(self: &Self) -> Option<BoxedValue>
The content shown when no view is available for the current view model
(DefaultContent).
set_default_content
fn set_default_content(self: &Self, value: Option<BoxedValue>)
Sets the content shown when no view is available for the current view model.
view_locator
fn view_locator(self: &Self) -> Option<Rc<dyn IViewLocator>>
The view locator used to resolve views (ViewLocator); None uses the current one.
set_view_locator
fn set_view_locator(self: &Self, value: Option<Rc<dyn IViewLocator>>)
Sets the view locator used to resolve views.
navigate_to_view_model
fn navigate_to_view_model(self: &Self, view_model: Option<Rc<dyn Any>>, contract: Option<&str>)
Navigates to the view associated with view_model and contract (NavigateToViewModel):
a missing router, view model or view displays the default content; a resolved view
receives the view model through its ViewModel and DataContext.
Deviation (DEVIATIONS.md, ReactiveUI controls): internal upstream, public here so that the tests, in another module, reach it.
dispose_navigation_disposables
fn dispose_navigation_disposables(self: &Self)
Disposes the active navigation subscriptions when they exist
(DisposeNavigationDisposables).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherTemplatedControlImplExtContentControlImplExtControlImplExtDerefUpcast<T>Upcast<RoutedViewHost>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplLayoutableImplInteractiveImplInputElementImplControlImplTemplatedControlImplContentControlImplIEnableLoggerStyledElementImplVisualImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.