Skip to main content

ScrollBarBase.ScrollBarAutoSize Property

Gets or sets a value specifying whether the scroll bar is automatically sized.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.Utils.v23.2.dll

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

Declaration

[DefaultValue(false)]
[DXCategory("Behavior")]
public bool ScrollBarAutoSize { get; set; }

Property Value

Type Default Description
Boolean false

true if the auto sizing feature is enabled; otherwise false.

Remarks

There are two types of scroll bars: vertical and horizontal - VScrollBar and HScrollBar. These classes inherit the ScrollBarAutoSize property from the ScrollBarBase class. There are two cases to be aware of:

  • Horizontal scroll bar

    When the ScrollBarAutoSize property is set to true, the scroll bar’s height is set to its default value (SystemInformation.HorizontalScrollBarHeight) and it can’t be changed either at design time or via code.

  • Vertical scroll bar

    When the ScrollBarAutoSize property is set to true, the scroll bar’s width is set to its default value (SystemInformation.VerticalScrollBarWidth) and it can’t be changed either at design time or via code.

Changing the ScrollBarAutoSize property value at runtime raises the ScrollBarBase.ScrollBarAutoSizeChanged event.

See Also