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.
Members
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<VisualState>
Returns a strong reference to this object.
construct
fn construct() -> Self
new
fn new() -> Ref<Self>
with_name
fn with_name(name: impl Into<String>) -> Ref<Self>
Creates a state with a name.
name
fn name(self: &Self) -> String
The name of the state, which VisualStateManager::go_to_state is given.
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).
setters
fn setters(self: &Self) -> FerroList<Rc<dyn SetterBase>>
The setters of the state (WinUI's SetterBaseCollection).
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).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<VisualState>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.