FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    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<AddClassAction>
    

    Returns a strong reference to this object.

    Source

    class_name_property

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

    Identifies the ClassName property.

    Source

    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.

    Source

    remove_if_exists_property

    fn remove_if_exists_property() -> &'static StyledProperty<bool>
    

    Identifies the RemoveIfExists 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

    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.

    Source

    set_class_name

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

    Source

    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.

    Source

    set_styled_element

    fn set_styled_element(self: &Self, value: impl Into<Nullable<StyledElement>>)
    

    Source

    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.

    Source

    set_remove_if_exists

    fn set_remove_if_exists(self: &Self, value: bool)
    

    Source

    Trait implementations

    Availability

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