FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ChangePropertyAction

    struct · ferroui-xaml-interactions · v0.5.0

    struct ChangePropertyAction
    

    An action that will change a specified property to a specified value when invoked.

    The property is found by name on the target: a registered property (an attached property is named (Owner.Name)), else a plain property declared in the markup metadata of the type of the target. Executed reversibly, the action can revert the change (see IReversibleAction).

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ChangePropertyAction>
    

    Returns a strong reference to this object.

    Source

    property_name_property

    fn property_name_property() -> &'static StyledProperty<Option<String>>
    

    Identifies the PropertyName property.

    Source

    target_object_property

    fn target_object_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Identifies the TargetObject property.

    Source

    value_property

    fn value_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Identifies the Value property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates an action.

    Source

    property_name

    fn property_name(self: &Self) -> Option<String>
    

    Gets or sets the name of the property to change. This is a property of the object model.

    Source

    set_property_name

    fn set_property_name(self: &Self, value: Option<String>)
    

    Source

    value

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

    Gets or sets the value to set. This is a property of the object model.

    Source

    set_action_value

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

    Sets the value to set (named apart from the setter of every property of the object, as the condition of the object model names its own).

    Source

    target_object

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

    Gets or sets the object whose property will be changed. If it is not set or cannot be resolved, the sender of execute is used. Markup resolves a name given for it to the named element. This is a property of the object model.

    Source

    set_target_object

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

    Source

    execute_reversibly

    fn execute_reversibly(self: &Self, sender: Option<&BoxedValue>, _parameter: Option<&BoxedValue>) -> Option<BoxedValue>
    

    Executes the action while capturing the state required to revert it.

    Source

    revert

    fn revert(self: &Self, _sender: Option<&BoxedValue>, _parameter: Option<&BoxedValue>) -> Option<BoxedValue>
    

    Reverts the property value captured when this action was first applied.

    Returns true if reverting the property value succeeds; else false.

    Source

    Trait implementations

    Availability

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