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.
Members
TYPEto_refis_fully_in_viewport_propertyis_in_viewport_propertyis_always_on_propertyconstructnewis_always_onset_is_always_onis_fully_in_viewportis_in_viewportentered_viewportexited_viewportentering_viewportexiting_viewport
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ViewportBehavior>
Returns a strong reference to this object.
is_fully_in_viewport_property
fn is_fully_in_viewport_property() -> &'static StyledProperty<bool>
Identifies the IsFullyInViewport property.
is_in_viewport_property
fn is_in_viewport_property() -> &'static StyledProperty<bool>
Identifies the IsInViewport property.
is_always_on_property
fn is_always_on_property() -> &'static StyledProperty<bool>
Identifies the IsAlwaysOn property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates a behavior.
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.
set_is_always_on
fn set_is_always_on(self: &Self, value: bool)
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.
is_in_viewport
fn is_in_viewport(self: &Self) -> bool
Gets a value indicating whether the associated element is in the ScrollViewer viewport.
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.
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.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAttachedToVisualTreeBehaviorImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherDisposingBehaviorImplExtStyledElementBehaviorImplExtDerefUpcast<T>Upcast<ViewportBehavior>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplStyledElementBehaviorImplDisposingBehaviorImplAttachedToVisualTreeBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.