Back to Devexpress

WindowsFormsSettings.InvertHorizontalScrolling Property

windowsforms-devexpress-dot-xtraeditors-dot-windowsformssettings-9acf3078.md

latest3.2 KB
Original Source

WindowsFormsSettings.InvertHorizontalScrolling Property

Gets or sets whether right swipe gestures and horizontal mouse wheel movements scroll the content of controls to the left, and vice versa.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.Utils.v25.2.dll

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

Declaration

csharp
public static DefaultBoolean InvertHorizontalScrolling { get; set; }
vb
Public Shared Property InvertHorizontalScrolling As DefaultBoolean

Property Value

TypeDescription
DefaultBoolean

True to invert the horizontal scrolling direction; otherwise, False or Default.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Remarks

The following controls scroll content in the direction of a swipe or horizontal movement of the mouse wheel:

Touchpad, touch screen, and mouse users may have different expectations regarding horizontal scrolling behavior. Some applications invert scrolling directions to match platform conventions or user preferences.

The InvertHorizontalScrolling property allows you to modify scrolling behavior to ensure consistency across applications and align with user expectations.

Enable the InvertHorizontalScrolling property at application startup (in Program.cs) to invert the horizontal scrolling direction. Right swipe gestures and horizontal mouse wheel movements scroll content to the left.

csharp
static void Main() {
  Application.EnableVisualStyles();
  Application.SetCompatibleTextRenderingDefault(false);
  WindowsFormsSettings.InvertHorizontalScrolling = DevExpress.Utils.DefaultBoolean.True;
  Application.Run(new Form1());
}
vb
Shared Sub Main()
    Application.EnableVisualStyles()
    Application.SetCompatibleTextRenderingDefault(False)
    WindowsFormsSettings.InvertHorizontalScrolling = DevExpress.Utils.DefaultBoolean.True
    Application.Run(New Form1())
End Sub

See Also

WindowsFormsSettings Class

WindowsFormsSettings Members

DevExpress.XtraEditors Namespace