FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SelectionIndicatorAnimation

    struct · ferroui-xaml-behaviors-animations · v0.5.0

    struct SelectionIndicatorAnimation
    

    Creates and applies the composition animation used to move a selection indicator between item containers.

    View source

    Members

    default_duration

    fn default_duration() -> Duration
    

    Gets the default selection indicator animation duration.

    Source

    try_start

    fn try_start(new_selection: Option<&TemplatedControl>, old_selection: Option<&TemplatedControl>, duration: Duration) -> bool
    

    Finds the standard selection indicator parts in the newly and the previously selected item containers and starts their movement animation over duration. Returns true when composition visuals were available and the animation was installed; otherwise, false.

    The reference throws an ArgumentOutOfRangeException for a negative duration; a Duration cannot be negative.

    Source

    try_start_with_visuals

    fn try_start_with_visuals(new_indicator: Option<&Visual>, old_indicator: Option<&Visual>, new_selection: Option<&Visual>, old_selection: Option<&Visual>, duration: Duration) -> bool
    

    Starts a selection indicator movement animation using explicitly supplied visuals: the indicator visuals in the newly and the previously selected containers, and the container visuals themselves. Returns true when composition visuals were available and the animation was installed; otherwise, false.

    Deviation (DEVIATIONS.md, Behaviors): the TryStart(Visual, Visual, Visual, Visual, TimeSpan) overload of the reference; Rust has no overloads.

    The reference throws an ArgumentOutOfRangeException for a negative duration; a Duration cannot be negative.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ClassDefaults
    • ErasedDestructor
    • IntoEither

    Availability

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