Skip to content

Latest commit

 

History

History
53 lines (32 loc) · 3.13 KB

scrollbarvisibility.md

File metadata and controls

53 lines (32 loc) · 3.13 KB
-api-id -api-type
T:Windows.UI.Xaml.Controls.ScrollBarVisibility
winrt enum

ScrollBarVisibility

-description

Defines constants that specify the visibility of a scrollbar within a ScrollViewer control.

-xaml-syntax

<object property="enumMemberName"/>

-enum-fields

-field Disabled:0

A ScrollBar does not appear even when the viewport cannot display all of the content. Scrolling is disabled.

The dimension of the content is set to the corresponding dimension of the ScrollViewer parent. For a horizontal ScrollBar, the width of the content is set to the ViewportWidth of the ScrollViewer. For a vertical ScrollBar, the height of the content is set to the ViewportHeight of the ScrollViewer.

-field Auto:1

A ScrollBar appears only when the viewport cannot display all of the content.

The dimension of the content is set to the corresponding dimension of the ScrollViewer parent. For a horizontal ScrollBar, the width of the content is set to the ViewportWidth of the ScrollViewer. For a vertical ScrollBar, the height of the content is set to the ViewportHeight of the ScrollViewer.

-field Hidden:2

A ScrollBar does not appear even when the viewport cannot display all of the content. Scrolling is still enabled, and can occur through touch, keyboard, or mouse wheel interaction.

The dimension of the content is not affected by the dimension of the ScrollViewer.

-field Visible:3

A ScrollBar always appears.

The dimension of the content is set to the corresponding dimension of the ScrollViewer parent. For a horizontal ScrollBar, the width of the content is set to the ViewportWidth of the ScrollViewer. For a vertical ScrollBar, the height of the content is set to the ViewportHeight of the ScrollViewer.

-remarks

-examples

The following example shows how to use the ScrollBarVisibility enumeration members to set the HorizontalScrollBarVisibility property of a ScrollViewer control.

[!code-xaml1]

-see-also