ScrollViewer.HorizontalScrollBarVisibility Property

Definition

Gets or sets a value that indicates whether a horizontal ScrollBar should be displayed.

C#
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
XAML
<ScrollViewer HorizontalScrollBarVisibility="scrollBarVisibilityMemberName"/>
-or-
<object ScrollViewer.HorizontalScrollBarVisibility="scrollBarVisibilityMemberName"/>

Property Value

A ScrollBarVisibility value that indicates whether a horizontal ScrollBar should be displayed. The default value is Disabled.

Remarks

For XAML usage, HorizontalScrollBarVisibility can either be an attribute on an explicit ScrollViewer element, or a ScrollViewer.HorizontalScrollBarVisibility attached property usage on an element that is a child of a control that supports scrollview implicitly in its template. Controls with a ScrollViewer as part of their composition typically use template binding such that setting the attached property at the level of the control will change the scroll behavior of the ScrollViewer part within the control. Otherwise, it may be necessary to replace the template in order to change the scroll behavior of a ScrollViewer part.

Applies to

Product Versions
WinRT Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100