FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    VisualState

    struct · ferroui-controls · v0.5.0

    struct VisualState
    

    A visual state: the values its setters set while it is the current state of its VisualStateGroup.

    The setters are setters with a target: markup writes <Setter Target="Element.Property" Value="..."/>. They are applied at animation priority, above local values and styles, and removed when the group leaves the state (docs/porting/winui-calculator-gaps.md, section 5.5).

    Deviation (docs/porting/winui-controls.md, VisualStateManager): x:Name names the state but does not register it in the name scope, so find_name does not find it.

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

    Returns a strong reference to this object.

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    with_name

    fn with_name(name: impl Into<String>) -> Ref<Self>
    

    Creates a state with a name.

    Source

    name

    fn name(self: &Self) -> String
    

    The name of the state, which VisualStateManager::go_to_state is given.

    Source

    set_name

    fn set_name(self: &Self, value: impl Into<String>)
    

    Sets the name (WinUI's x:Name; the name is read-only in WinUI once the state is loaded).

    Source

    setters

    fn setters(self: &Self) -> FerroList<Rc<dyn SetterBase>>
    

    The setters of the state (WinUI's SetterBaseCollection).

    Source

    state_triggers

    fn state_triggers(self: &Self) -> FerroList<Ref<StateTriggerBase>>
    

    The triggers of the state: the state is a candidate to be the current state of its group while one of them is active (several triggers of a state are alternatives).

    Source

    Trait implementations

    Availability

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