RichTextBox.VerticalScrollBarVisibility Property

July 28, 2014

Gets or sets the visibility of the vertical scroll bar.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public ScrollBarVisibility VerticalScrollBarVisibility { get; set; }
<RichTextBox VerticalScrollBarVisibility="scrollBarVisibilityValue"/>

XAML Values

scrollBarVisibilityValue

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

Property Value

Type: System.Windows.Controls.ScrollBarVisibility
The visibility of the vertical scroll bar. The default is Auto.

If the VerticalScrollBarVisibility property is set to Disabled, the RichTextBox does not scroll vertically.

The following XAML shows how to use the VerticalScrollBarVisibility property.


<RichTextBox Margin="20,20,0,0" Width="300" Height="50" AcceptsReturn="True" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
    <Paragraph>
        A RichTextBox that demonstrates HorizontalScrollBarVisibility and VerticalScrollBarVisibility
    </Paragraph>
</RichTextBox>


Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2014 Microsoft