Skip to main content

XtraScrollableControl.AutoScrollPosition Property

Gets or sets the location of the auto-scroll position.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v24.1.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

Declaration

[Browsable(false)]
public Point AutoScrollPosition { get; set; }

Property Value

Type Description
Point

A Point structure that represents the auto-scroll position, in pixels.

Remarks

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).

XtraScrollableControl_asPosition

You can manually change the AutoScrollPosition property value to scroll the XtraScrollableControl.

See Also