Skip to main content

IScrollSnapPointsInfo Interface

Definition​

Assembly:Avalonia.Controls
Package:Avalonia

Describes snap point behavior for objects that contain and present items.

public interface IScrollSnapPointsInfo

Methods​

NameDescription
GetIrregularSnapPointsReturns the set of distances between irregular snap points for a specified orientation and alignment.
GetRegularSnapPointsNo summary available.

GetIrregularSnapPoints Method​

Returns the set of distances between irregular snap points for a specified orientation and alignment.

public System.Collections.Generic.IReadOnlyList<double> GetIrregularSnapPoints(Avalonia.Layout.Orientation orientation, Avalonia.Controls.Primitives.SnapPointsAlignment snapPointsAlignment)

Parameters​

orientation Avalonia.Layout.Orientation

The orientation for the desired snap point set.

snapPointsAlignment Avalonia.Controls.Primitives.SnapPointsAlignment

The alignment to use when applying the snap points.

Returns​

System.Collections.Generic.IReadOnlyList<double>

The read-only collection of snap point distances. Returns an empty collection when no snap points are present.

GetRegularSnapPoints Method​

public double GetRegularSnapPoints(Avalonia.Layout.Orientation orientation, Avalonia.Controls.Primitives.SnapPointsAlignment snapPointsAlignment, double& offset)

Parameters​

orientation Avalonia.Layout.Orientation

snapPointsAlignment Avalonia.Controls.Primitives.SnapPointsAlignment

offset double&

Returns​

double

Properties​

NameDescription
AreHorizontalSnapPointsRegularGets or sets a value that indicates whether the horizontal snap points for the container are equidistant from each other.
AreVerticalSnapPointsRegularGets or sets a value that indicates whether the vertical snap points for the container are equidistant from each other.

AreHorizontalSnapPointsRegular Property​

Gets or sets a value that indicates whether the horizontal snap points for the container are equidistant from each other.

public bool AreHorizontalSnapPointsRegular { get; set; }

AreVerticalSnapPointsRegular Property​

Gets or sets a value that indicates whether the vertical snap points for the container are equidistant from each other.

public bool AreVerticalSnapPointsRegular { get; set; }

Events​

NameDescription
HorizontalSnapPointsChangedOccurs when the measurements for horizontal snap points change.
VerticalSnapPointsChangedOccurs when the measurements for vertical snap points change.

HorizontalSnapPointsChanged Event​

Occurs when the measurements for horizontal snap points change.

public event EventHandler<Avalonia.Interactivity.RoutedEventArgs> HorizontalSnapPointsChanged

VerticalSnapPointsChanged Event​

Occurs when the measurements for vertical snap points change.

public event EventHandler<Avalonia.Interactivity.RoutedEventArgs> VerticalSnapPointsChanged