FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    StyledPropertyOptions

    struct · ferroui-base · v0.5.0

    struct StyledPropertyOptions<T>
    

    Options for registering a styled or attached property.

    View source

    Members

    new

    fn new(default_value: T) -> Self
    

    Source

    inherits

    fn inherits(self: Self, inherits: bool) -> Self
    

    Whether the property inherits its value from the parent object.

    Source

    default_binding_mode

    fn default_binding_mode(self: Self, mode: BindingMode) -> Self
    

    The default binding mode for the property.

    Source

    validate

    fn validate(self: Self, validate: impl Fn(&T) -> bool + 'static) -> Self
    

    A value validation callback. Setting a value for which it returns false is rejected.

    Source

    coerce

    fn coerce(self: Self, coerce: impl Fn(&FerroObject, T) -> T + 'static) -> Self
    

    A value coercion callback.

    Source

    enable_data_validation

    fn enable_data_validation(self: Self, enable: bool) -> Self
    

    Whether the property is interested in data validation.

    Source

    assign_binding

    fn assign_binding(self: Self, assign_binding: bool) -> Self
    

    Whether a binding given for the property in markup is assigned to the property instead of bound to it; see FerroProperty::assign_binding.

    Source

    notifying

    fn notifying(self: Self, notifying: impl Fn(&FerroObject, bool) -> () + 'static) -> Self
    

    A callback invoked before and after change notifications are raised.

    Source

    Trait implementations

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

    Availability

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