FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IActivatableView

    trait · ferroui-reactiveui · v0.5.0

    trait IActivatableView: Any
    

    The marker of a view that can be activated (IActivatableView); every IViewFor is one. Upstream declares no members.

    It is Any, so that the code that activates a view (the activation fetchers) can find the concrete type of the view behind a &dyn IActivatableView.

    Deviation (DEVIATIONS.md, ReactiveUI): upstream asks a view at run time whether it is an IViewFor and whether it raises PropertyChanged (view is IViewFor, view is INotifyPropertyChanged), which Rust cannot ask of a trait object. The two provided methods answer it; a view overrides them, and view_for! writes them.

    View source

    Members

    as_view_for

    fn as_view_for(self: &Self) -> Option<&dyn IViewFor>
    

    The view as an IViewFor, when it is one (view as IViewFor); None by default.

    Source

    as_notify_property_changed

    fn as_notify_property_changed(self: Rc<Self>) -> Option<Rc<dyn INotifyPropertyChanged>>
    

    The change notification of the view, when it raises PropertyChanged (view as INotifyPropertyChanged); None by default. The property observation of the view's ViewModel uses it.

    Source

    as_can_activate

    fn as_can_activate(self: &Self) -> Option<&dyn crate::ICanActivate>
    

    The view as an ICanActivate, when it is one (view as ICanActivate); None by default. CanActivateViewFetcher uses it.

    Source

    Availability

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