windowsforms-devexpress-dot-xtraeditors-dot-xtrascrollablecontrol-22a30eab.md
Gets or sets the location of the auto-scroll position.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.Utils.v25.2.dll
NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core
[Browsable(false)]
public Point AutoScrollPosition { get; set; }
<Browsable(False)>
Public Property AutoScrollPosition As Point
| Type | Description |
|---|---|
| Point |
A Point structure that represents the auto-scroll position, in pixels.
|
The AutoScrollPosition property specifies the location of the XtraScrollableControl ‘s view (display rectangle). The control’s starting position is (0, 0). You must always assign positive X and Y values to set the scroll position relative to the starting position.
If the XtraScrollableControl is scrolled away from its starting position, the X and Y coordinate values are always negative. For example, if you set X to 100, you have to scroll 100 pixels to the right. In this instance, the AutoScrollPosition property returns (-100, 0). If you then set X to 50, the scroll jumps to the left by 50 pixels and the AutoScrollPosition property returns (-50, 0).
You can manually change the AutoScrollPosition property value to scroll the XtraScrollableControl.
See Also