FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PropertyHelper

    struct · ferroui-xaml-interactivity · v0.5.0

    struct PropertyHelper
    

    Reads and writes the properties of objects by name: the registered properties of objects of the class model (Name, and attached properties as (Owner.Name)), and the plain properties of any value that declares them in its markup metadata.

    Errors are the argument exceptions of the reference, as their messages.

    View source

    Members

    try_set_temporary_ferro_property_value

    fn try_set_temporary_ferro_property_value(target_object: &BoxedValue, property_name: &str, value: Option<&BoxedValue>) -> Result<Option<Rc<dyn IDisposable>>, String>
    

    Sets a registered property of target_object with the animation priority, so that disposing the returned handle reverts the change. Ok(None) when the target is not an object, has no such property or the property is direct.

    Source

    is_direct_ferro_property

    fn is_direct_ferro_property(target_object: &BoxedValue, property_name: &str) -> bool
    

    Whether property_name names a direct property of target_object.

    Source

    update_property_value

    fn update_property_value(target_object: &BoxedValue, property_name: &str, value: Option<&BoxedValue>, preserve_value_source: bool) -> Result<bool, String>
    

    Sets the property property_name of target_object to value, converting the value to the type of the property (preserve_value_source sets the current value of a registered property instead of its local value). Returns false when an attached property named (Owner.Name) is not found.

    Errors

    The property is not found, is read-only, or the value does not convert to its type.

    Source

    try_get_property_value

    fn try_get_property_value(target_object: &BoxedValue, property_name: &str) -> Result<Option<(Option<BoxedValue>, bool)>, String>
    

    Reads the property property_name of target_object: Ok(Some((value, preserve_value_source))) when it is read (preserve_value_source is true for a registered property), Ok(None) for an attached property that is not found or a plain property that cannot be read.

    Errors

    A plain property of the name is not found.

    Source

    Trait implementations

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

    Availability

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