FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    new

    fn new() -> Rc<Self>
    

    Source

    with_resource_key

    fn with_resource_key(resource_key: Option<BoxedValue>) -> Rc<Self>
    

    Creates the extension with a resource key.

    Source

    resource_key

    fn resource_key(self: &Self) -> Option<BoxedValue>
    

    The key of the resource: text, a type or any other value.

    Source

    set_resource_key

    fn set_resource_key(self: &Self, value: Option<BoxedValue>)
    

    Source

    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.

    Source

    as_binding

    fn as_binding(self: &Self) -> Rc<dyn BindingBase>
    

    The extension as the binding contract.

    Source

    Trait implementations

    Availability

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