DynamicResourceExtension
struct · ferroui-markup-xaml · v0.5.0
struct DynamicResourceExtension
{DynamicResource Key}: a binding to a resource, which follows changes
of the resources and of the theme variant.
Members
new
fn new() -> Rc<Self>
with_resource_key
fn with_resource_key(resource_key: Option<BoxedValue>) -> Rc<Self>
Creates the extension with a resource key.
resource_key
fn resource_key(self: &Self) -> Option<BoxedValue>
The key of the resource: text, a type or any other value.
set_resource_key
fn set_resource_key(self: &Self, value: Option<BoxedValue>)
provide_value
fn provide_value(self: &Self, service_provider: &Rc<dyn IServiceProvider>) -> Rc<DynamicResourceExtension>
Captures the context of the place the extension is declared in (the anchor to find resources from, the theme variant of a theme dictionary, the priority inside a control template) and returns the extension itself: it is the binding.
as_binding
fn as_binding(self: &Self) -> Rc<dyn BindingBase>
The extension as the binding contract.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyAnyValueClassDefaultsErasedDestructorIntoEitherBindingBasePartialEqMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.