Class ScrollViewScrollBehavior
- Namespace
- AlohaKit.Animations
- Assembly
- AlohaKit.Animations.dll
The ScrollViewScrollBehavior class provides bindable properties to observe the horizontal and vertical scroll positions of a ScrollView and calculates relative and percentage-based scroll values.
public class ScrollViewScrollBehavior : Behavior<ScrollView>, INotifyPropertyChanged
- Inheritance
-
ScrollViewScrollBehavior
- Implements
- Inherited Members
Fields
PercentageScrollXProperty
Bindable property for the horizontal scroll value as a percentage (0% to 100%).
public static readonly BindableProperty PercentageScrollXProperty
Field Value
PercentageScrollYProperty
Bindable property for the vertical scroll value as a percentage (0% to 100%).
public static readonly BindableProperty PercentageScrollYProperty
Field Value
RelativeScrollXProperty
Bindable property for the horizontal scroll value between 0 and 1.
public static readonly BindableProperty RelativeScrollXProperty
Field Value
RelativeScrollYProperty
Bindable property for the vertical scroll value between 0 and 1.
public static readonly BindableProperty RelativeScrollYProperty
Field Value
ScrollXProperty
Bindable property for the horizontal scroll value in pixels.
public static readonly BindableProperty ScrollXProperty
Field Value
ScrollYProperty
Bindable property for the vertical scroll value in pixels.
public static readonly BindableProperty ScrollYProperty
Field Value
Properties
PercentageScrollX
Gets or sets the horizontal scroll value as a percentage (0% to 100%).
public double PercentageScrollX { get; set; }
Property Value
PercentageScrollY
Gets or sets the vertical scroll value as a percentage (0% to 100%).
public double PercentageScrollY { get; set; }
Property Value
RelativeScrollX
Gets or sets the horizontal scroll value as a relative value between 0 and 1.
public double RelativeScrollX { get; set; }
Property Value
RelativeScrollY
Gets or sets the vertical scroll value as a relative value between 0 and 1.
public double RelativeScrollY { get; set; }
Property Value
ScrollX
Gets or sets the horizontal scroll value in pixels.
public double ScrollX { get; set; }
Property Value
ScrollY
Gets or sets the vertical scroll value in pixels.
public double ScrollY { get; set; }
Property Value
Methods
OnAttachedTo(ScrollView)
Called when the behavior is attached to a ScrollView. Subscribes to the scroll event of the associated ScrollView.
protected override void OnAttachedTo(ScrollView bindable)
Parameters
bindableScrollViewThe ScrollView to which the behavior is attached.
OnDetachingFrom(ScrollView)
Called when the behavior is detached from a ScrollView. Unsubscribes from the scroll event of the associated ScrollView.
protected override void OnDetachingFrom(ScrollView bindable)
Parameters
bindableScrollViewThe ScrollView from which the behavior is detached.