Expand Minimize

ScrollViewer.VerticalScrollBarVisibility property

Applies to Windows and Windows Phone

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

Syntax


public:
property ScrollBarVisibility VerticalScrollBarVisibility { 
   ScrollBarVisibility get();
   void set (ScrollBarVisibility value);
}


<ScrollViewer VerticalScrollBarVisibility="scrollBarVisibilityMemberName"/>
-or-
<object ScrollViewer.VerticalScrollBarVisibility="scrollBarVisibilityMemberName"/>

XAML Values

scrollBarVisibilityMemberName

A named constant of the ScrollBarVisibility enumeration, such as Auto.

Property value

Type: ScrollBarVisibility

A ScrollBarVisibility value that indicates whether a vertical ScrollBar should be displayed. The default value is Visible.

Remarks

Scrolling behavior can also be set through a ScrollViewer.VerticalScrollBarVisibility XAML attached property usage, or by calling SetVerticalScrollBarVisibility. This is for cases where the ScrollViewer is implicit, such as when the ScrollViewer exists in the default template for a GridView, and you want to be able to influence the scrolling behavior without accessing template parts. 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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ScrollViewer

 

 

Show:
© 2014 Microsoft