RichTextBox.HorizontalScrollBarVisibility Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets the visibility of the horizontal scroll bar.
Assembly: System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.
<RichTextBox HorizontalScrollBarVisibility="scrollBarVisibilityValue"/>
XAML Values
Property Value
Type: System.Windows.Controls.ScrollBarVisibilityThe 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>