FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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/.

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

    Returns a strong reference to this object.

    Source

    router_property

    fn router_property() -> &'static StyledProperty<Option<Rc<RoutingState>>>
    

    Identifies the Router property (RouterProperty).

    Source

    view_contract_property

    fn view_contract_property() -> &'static StyledProperty<Option<String>>
    

    Identifies the ViewContract property (ViewContractProperty).

    Source

    default_content_property

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

    Identifies the DefaultContent property (DefaultContentProperty), the one of ViewModelViewHost with this owner added.

    Source

    construct

    fn construct() -> Self
    

    Field initialisation.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates the host.

    Source

    router

    fn router(self: &Self) -> Option<Rc<RoutingState>>
    

    The current routing state (Router).

    Source

    set_router

    fn set_router(self: &Self, value: Option<Rc<RoutingState>>)
    

    Sets the routing state to follow.

    Source

    view_contract

    fn view_contract(self: &Self) -> Option<String>
    

    The contract of the views to resolve (ViewContract).

    Source

    set_view_contract

    fn set_view_contract(self: &Self, value: Option<String>)
    

    Sets the contract of the views to resolve.

    Source

    default_content

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

    The content shown when no view is available for the current view model (DefaultContent).

    Source

    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.

    Source

    view_locator

    fn view_locator(self: &Self) -> Option<Rc<dyn IViewLocator>>
    

    The view locator used to resolve views (ViewLocator); None uses the current one.

    Source

    set_view_locator

    fn set_view_locator(self: &Self, value: Option<Rc<dyn IViewLocator>>)
    

    Sets the view locator used to resolve views.

    Source

    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.

    Source

    dispose_navigation_disposables

    fn dispose_navigation_disposables(self: &Self)
    

    Disposes the active navigation subscriptions when they exist (DisposeNavigationDisposables).

    Source

    Trait implementations

    Availability

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