FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IResourceHost

    trait · ferroui-base · v0.5.0

    trait IResourceHost: IResourceNode
    

    Represents an element which hosts resources.

    Implemented by StyledElement and by the application object, the root of the styling-parent chain.

    View source

    Members

    resources_changed

    fn resources_changed(self: &Self, handler: Rc<dyn Fn(&ResourcesChangedEventArgs) -> ()>) -> Rc<dyn IDisposable>
    

    Raised when the resources change on the element or an ancestor of the element. Disposing the returned handle unsubscribes.

    Source

    notify_hosted_resources_changed

    fn notify_hosted_resources_changed(self: &Self, e: ResourcesChangedEventArgs)
    

    Notifies the resource host that one or more of its hosted resources has changed.

    This method will be called automatically by the framework, you should not need to call this method yourself. It is called when the resources hosted by this element have changed, and is usually called by a resource dictionary or style hosted by the element in response to a resource being added or removed.

    Source

    as_style_host

    fn as_style_host(self: &Self) -> Option<&dyn IStyleHost>
    

    The host as a style host, if it is one.

    Source

    as_theme_variant_host

    fn as_theme_variant_host(self: &Self) -> Option<&dyn IThemeVariantHost>
    

    The host as a theme variant host, if it is one.

    Source

    Trait implementations

    Availability

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