Table of Contents

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

BindableProperty

PercentageScrollYProperty

Bindable property for the vertical scroll value as a percentage (0% to 100%).

public static readonly BindableProperty PercentageScrollYProperty

Field Value

BindableProperty

RelativeScrollXProperty

Bindable property for the horizontal scroll value between 0 and 1.

public static readonly BindableProperty RelativeScrollXProperty

Field Value

BindableProperty

RelativeScrollYProperty

Bindable property for the vertical scroll value between 0 and 1.

public static readonly BindableProperty RelativeScrollYProperty

Field Value

BindableProperty

ScrollXProperty

Bindable property for the horizontal scroll value in pixels.

public static readonly BindableProperty ScrollXProperty

Field Value

BindableProperty

ScrollYProperty

Bindable property for the vertical scroll value in pixels.

public static readonly BindableProperty ScrollYProperty

Field Value

BindableProperty

Properties

PercentageScrollX

Gets or sets the horizontal scroll value as a percentage (0% to 100%).

public double PercentageScrollX { get; set; }

Property Value

double

PercentageScrollY

Gets or sets the vertical scroll value as a percentage (0% to 100%).

public double PercentageScrollY { get; set; }

Property Value

double

RelativeScrollX

Gets or sets the horizontal scroll value as a relative value between 0 and 1.

public double RelativeScrollX { get; set; }

Property Value

double

RelativeScrollY

Gets or sets the vertical scroll value as a relative value between 0 and 1.

public double RelativeScrollY { get; set; }

Property Value

double

ScrollX

Gets or sets the horizontal scroll value in pixels.

public double ScrollX { get; set; }

Property Value

double

ScrollY

Gets or sets the vertical scroll value in pixels.

public double ScrollY { get; set; }

Property Value

double

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

bindable ScrollView

The 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

bindable ScrollView

The ScrollView from which the behavior is detached.