FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ServiceProviderExtensions

    trait · ferroui-markup-xaml · v0.5.0

    trait ServiceProviderExtensions
    

    The lookups built on the services of a markup service provider.

    (GetService<T> of the managed original is get_service_of of the service provider contract itself.)

    View source

    Members

    get_required_service

    fn get_required_service<T: Clone + 'static>(self: &Self) -> T
    

    The service used through the handle type T. Panics if the provider has no such service: a markup runtime without it is misconfigured.

    Source

    get_context_base_uri

    fn get_context_base_uri(self: &Self) -> Option<url::Url>
    

    The base URI of the document being loaded.

    Source

    get_name_scope

    fn get_name_scope(self: &Self) -> Option<Rc<dyn INameScope>>
    

    The name scope in effect. A provider may publish it as a contract handle or as the property-value handle; both are asked for.

    Source

    get_first_parent

    fn get_first_parent<T: FromXamlObject>(self: &Self) -> Option<T>
    

    The nearest parent that is a T.

    Source

    get_last_parent

    fn get_last_parent<T: FromXamlObject>(self: &Self) -> Option<T>
    

    The outermost parent that is a T.

    Source

    get_parents

    fn get_parents<T: FromXamlObject>(self: &Self) -> Vec<T>
    

    The parents that are a T, the nearest first.

    Source

    is_in_control_template

    fn is_in_control_template(self: &Self) -> bool
    

    Whether the content of a control template is being built.

    Source

    resolve_type

    fn resolve_type(self: &Self, namespace_prefix: Option<&str>, type_: &str) -> Result<CastTarget, XamlLoadError>
    

    Resolves a type name with the namespaces of the document.

    Source

    get_default_anchor

    fn get_default_anchor(self: &Self) -> Option<Ref<FerroObject>>
    

    An object from which bindings whose target is not a control can locate a data context, named controls and style resources.

    Source

    Trait implementations

    Availability

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