IScrollProvider.SetScrollPercent(Double, Double) Method
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.
Sets the horizontal and vertical scroll position as a percentage of the total content area within the control.
public:
void SetScrollPercent(double horizontalPercent, double verticalPercent);
public void SetScrollPercent (double horizontalPercent, double verticalPercent);
abstract member SetScrollPercent : double * double -> unit
Public Sub SetScrollPercent (horizontalPercent As Double, verticalPercent As Double)
Parameters
- horizontalPercent
- Double
The horizontal position as a percentage of the content area's total range. NoScroll should be passed in if the control cannot be scrolled in this direction.
- verticalPercent
- Double
The vertical position as a percentage of the content area's total range. NoScroll should be passed in if the control cannot be scrolled in this direction.
Exceptions
A value that cannot be converted to a double is passed in.
A value greater than 100 or less than 0 is passed in (except -1, which is equivalent to NoScroll). The HorizontalScrollPercent and VerticalScrollPercent values are normalized to either 100 percent or 0 percent.
An attempt is made to scroll in an unsupported direction.
Remarks
This method is only useful when the content area of the control is larger than the visible region.
Passing in the value NoScroll indicates that there is no scrolling in the specified direction.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om