FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SwitchCaseBehavior

    struct · ferroui-xaml-interactions-custom · v0.5.0

    struct SwitchCaseBehavior
    

    A trigger that executes the actions of the first of its cases (its content in markup) whose value equals value, or its default_actions when none does: once when it is initialized, then in a job of the dispatcher after each change of the value.

    While the trigger is in the logical tree its cases and its styled element default actions are its logical children (one way).

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

    Returns a strong reference to this object.

    Source

    value_property

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

    Identifies the Value property.

    Source

    cases_property

    fn cases_property() -> &'static StyledProperty<Option<CaseCollection>>
    

    Identifies the Cases property.

    Source

    default_actions_property

    fn default_actions_property() -> &'static StyledProperty<Option<ActionCollection>>
    

    Identifies the DefaultActions property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a trigger.

    Source

    value

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

    Gets or sets the value compared with the values of the cases. This is a property of the object model.

    Source

    set_switch_value

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

    Sets the value compared with the values of the cases (named apart from the setter of every property of the object, as the condition of the object model names its own).

    Source

    cases

    fn cases(self: &Self) -> Option<CaseCollection>
    

    Gets or sets the cases. This is a property of the object model.

    Source

    set_cases

    fn set_cases(self: &Self, value: Option<CaseCollection>)
    

    Source

    default_actions

    fn default_actions(self: &Self) -> Option<ActionCollection>
    

    Gets or sets the actions executed when no case matches. This is a property of the object model.

    Source

    set_default_actions

    fn set_default_actions(self: &Self, value: Option<ActionCollection>)
    

    Source

    Trait implementations

    Availability

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