BringIntoViewRequestedEventArgs.VerticalAlignmentRatio 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.
Gets the requested vertical alignment ratio which controls the alignment of the horizontal axis of the TargetRect with respect to the horizontal axis of the viewport.
public:
property double VerticalAlignmentRatio { double get(); };
double VerticalAlignmentRatio();
public double VerticalAlignmentRatio { get; }
var double = bringIntoViewRequestedEventArgs.verticalAlignmentRatio;
Public ReadOnly Property VerticalAlignmentRatio As Double
Property Value
double
The requested vertical alignment ratio between 0.0 and 1.0, or NaN. See Remarks.
Remarks
A value of NaN indicates that scrolling controls should do the minimum necessary to bring the element fully into view aligned to the nearest edge of the viewport.
Note
Do not use the ==
operator to test for NaN.
In C#, use Double.IsNaN() to test for NaN.
In C++, use isnan() to test for NaN.
If the value is not NaN, then the range of possible value is clamped from 0.0 to 1.0 with 0.0 representing the top horizontal edge and 1.0 representing the bottom horizontal edge.
All scrolling controls that participate in bringing an element into view are expected to honor the alignment request to the extent possible. This value cannot be modified by event handlers as the event bubbles. If a control cannot fully satisfy the request then it should not alter the requested VerticalOffset property as it bubbles up.