Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

XtraScrollableControl.AutoScrollPosition Property

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v24.2.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