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).
Members
TYPEto_refproperty_name_propertytarget_object_propertyvalue_propertyconstructnewproperty_nameset_property_namevalueset_action_valuetarget_objectset_target_objectexecute_reversiblyrevert
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ChangePropertyAction>
Returns a strong reference to this object.
property_name_property
fn property_name_property() -> &'static StyledProperty<Option<String>>
Identifies the PropertyName property.
target_object_property
fn target_object_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the TargetObject property.
value_property
fn value_property() -> &'static StyledProperty<Option<BoxedValue>>
Identifies the Value property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates an action.
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.
set_property_name
fn set_property_name(self: &Self, value: Option<String>)
value
fn value(self: &Self) -> Option<BoxedValue>
Gets or sets the value to set. This is a property of the object model.
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).
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.
set_target_object
fn set_target_object(self: &Self, value: Option<BoxedValue>)
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementActionImplExtDerefUpcast<T>Upcast<ChangePropertyAction>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplStyledElementActionImplIActionIReversibleAction
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.