FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ViewportBehavior

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

    struct ViewportBehavior
    

    Listens for the associated element entering or exiting the parent ScrollViewer viewport.

    Deviation (DEVIATIONS.md, Behaviors): the events of the behavior are Rust handler lists (entered_viewport and the others, which return the subscription), declared to markup as plain events.

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

    Returns a strong reference to this object.

    Source

    is_fully_in_viewport_property

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

    Identifies the IsFullyInViewport property.

    Source

    is_in_viewport_property

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

    Identifies the IsInViewport property.

    Source

    is_always_on_property

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

    Identifies the IsAlwaysOn property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Creates a behavior.

    Source

    is_always_on

    fn is_always_on(self: &Self) -> bool
    

    Gets or sets a value indicating whether this behavior will remain attached after the associated element enters the viewport. When false, the behavior will remove itself after entering.

    Source

    set_is_always_on

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

    Source

    is_fully_in_viewport

    fn is_fully_in_viewport(self: &Self) -> bool
    

    Gets a value indicating whether the associated element is fully in the ScrollViewer viewport.

    Source

    is_in_viewport

    fn is_in_viewport(self: &Self) -> bool
    

    Gets a value indicating whether the associated element is in the ScrollViewer viewport.

    Source

    entered_viewport

    fn entered_viewport(self: &Self, handler: impl Fn(Option<&BoxedValue>, &EventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Occurs when the associated element has fully entered the viewport.

    Source

    exited_viewport

    fn exited_viewport(self: &Self, handler: impl Fn(Option<&BoxedValue>, &EventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Occurs when the associated element has fully exited the viewport.

    Source

    entering_viewport

    fn entering_viewport(self: &Self, handler: impl Fn(Option<&BoxedValue>, &EventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Occurs when the associated element starts entering the viewport.

    Source

    exiting_viewport

    fn exiting_viewport(self: &Self, handler: impl Fn(Option<&BoxedValue>, &EventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Occurs when the associated element starts exiting the viewport.

    Source

    Trait implementations

    Availability

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