FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StaticResourceExtension

    struct · ferroui-markup-xaml · v0.5.0

    struct StaticResourceExtension
    

    {StaticResource Key}: looks a resource up once, when the document is loaded, in the resource nodes above the place it is used.

    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>) -> Result<Option<BoxedValue>, XamlLoadError>
    

    The resource. If it is not found and the target is a control that is still being initialised, the lookup is repeated when the control is initialised and the unset value marker is returned for now.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • PartialEq
    • MarkupTyped

    Availability

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