ScrollPresenter.VerticalAnchorRatio Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Determines the vertical position of the ScrollPresenter
's anchor point with respect to the viewport. By default, the ScrollPresenter
selects an element as its CurrentAnchor by identifying the element in its viewport nearest to the anchor point.
public:
property double VerticalAnchorRatio { double get(); void set(double value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")]
double VerticalAnchorRatio();
void VerticalAnchorRatio(double value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")]
double VerticalAnchorRatio();
void VerticalAnchorRatio(double value);
public double VerticalAnchorRatio { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")]
public double VerticalAnchorRatio { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="ScrollPresenter::s_defaultAnchorRatio")] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallback(value="ValidateAnchorRatio")] set; }
var double = scrollPresenter.verticalAnchorRatio;
scrollPresenter.verticalAnchorRatio = double;
Public Property VerticalAnchorRatio As Double
Property Value
double
A normalized value (0.0 to 1.0). The default is 0.0.
- Attributes
-
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyValidationCallbackAttribute
Remarks
A value of 0.0 represents the top-most point within the viewport. A value of 1.0 represents the bottom-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 ScrollPresenter
applies special behavior when the scroll position is at the start or end of the scrollable area.