AddClassAction
struct · ferroui-xaml-interactions-custom · v0.5.0
struct AddClassAction
Adds a style class to the styled_element, or to the sender when it
is not set.
Members
TYPEto_refclass_name_propertystyled_element_propertyremove_if_exists_propertyconstructnewclass_nameset_class_namestyled_elementset_styled_elementremove_if_existsset_remove_if_exists
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<AddClassAction>
Returns a strong reference to this object.
class_name_property
fn class_name_property() -> &'static StyledProperty<Option<String>>
Identifies the ClassName property.
styled_element_property
fn styled_element_property() -> &'static StyledProperty<Option<ElementRef<StyledElement>>>
Identifies the StyledElement property.
Deviation (DEVIATIONS.md, Behaviors): the action does not own its target, so the value is an element reference.
remove_if_exists_property
fn remove_if_exists_property() -> &'static StyledProperty<bool>
Identifies the RemoveIfExists property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates an action.
class_name
fn class_name(self: &Self) -> Option<String>
Gets or sets the class name to add. This is a property of the object model.
set_class_name
fn set_class_name(self: &Self, value: Option<String>)
styled_element
fn styled_element(self: &Self) -> Option<Ref<StyledElement>>
Gets or sets the target styled element that class name will be added to. If not set, the sender is used. Markup resolves a name given for it to the named element.
set_styled_element
fn set_styled_element(self: &Self, value: impl Into<Nullable<StyledElement>>)
remove_if_exists
fn remove_if_exists(self: &Self) -> bool
Gets or sets whether the class is removed before it is added (so that styles are applied again). This is a property of the object model.
set_remove_if_exists
fn set_remove_if_exists(self: &Self, value: bool)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementActionImplExtDerefUpcast<T>Upcast<AddClassAction>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplStyledElementActionImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.