Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RichTextBox.HorizontalScrollBarVisibility Property

Silverlight

Gets or sets the visibility of the horizontal scroll bar.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
<RichTextBox HorizontalScrollBarVisibility="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 horizontal scroll bar. The default is Hidden.

If the HorizontalScrollBarVisibility property is set to Disabled, the RichTextBox does not scroll horizontally. If the TextWrapping property is set to Wrap, the HorizontalScrollBarVisibility property is automatically set to Disabled and any property changes to the HorizontalScrollBarVisibility are ignored.

The following XAML shows how to use the HorizontalScrollBarVisibility 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>


Silverlight

Supported in: 5, 4

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.