ScrollViewer.HorizontalAnchorRatio Property

Definition

Determines the horizontal position of the ScrollViewer's anchor point with respect to the viewport. By default, the ScrollViewer selects an element as its CurrentAnchor by identifying the element in its viewport nearest to the anchor point.

Equivalent WinUI property: Microsoft.UI.Xaml.Controls.ScrollViewer.HorizontalAnchorRatio.

public:
 property double HorizontalAnchorRatio { double get(); void set(double value); };
double HorizontalAnchorRatio();

void HorizontalAnchorRatio(double value);
public double HorizontalAnchorRatio { get; set; }
var double = scrollViewer.horizontalAnchorRatio;
scrollViewer.horizontalAnchorRatio = double;
Public Property HorizontalAnchorRatio As Double

Property Value

Double

A normalized value (0.0 to 1.0). The default is 0.0.

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v7.0)

Remarks

A value of 0.0 represents the left-most point within the viewport. A value of 1.0 represents the right-most point within the viewport. A value of 0.5f represents the center-most point within the viewport.

When the value is 0.0 or 1.0 the ScrollViewer applies special behavior when the scroll position is at the start or end of the scrollable area.

Applies to

See also