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.)
Members
get_required_serviceget_context_base_uriget_name_scopeget_first_parentget_last_parentget_parentsis_in_control_templateresolve_typeget_default_anchor
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.
get_context_base_uri
fn get_context_base_uri(self: &Self) -> Option<url::Url>
The base URI of the document being loaded.
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.
get_first_parent
fn get_first_parent<T: FromXamlObject>(self: &Self) -> Option<T>
The nearest parent that is a T.
get_last_parent
fn get_last_parent<T: FromXamlObject>(self: &Self) -> Option<T>
The outermost parent that is a T.
get_parents
fn get_parents<T: FromXamlObject>(self: &Self) -> Vec<T>
The parents that are a T, the nearest first.
is_in_control_template
fn is_in_control_template(self: &Self) -> bool
Whether the content of a control template is being built.
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.
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.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.