Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TextBoxBase.HorizontalScrollBarVisibility Property

 

Gets or sets a value that indicates whether a horizontal scroll bar is shown.

Namespace:   System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)

public ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }

Property Value

Type: System.Windows.Controls.ScrollBarVisibility

A value that is defined by the ScrollBarVisibility enumeration.

The default value is Hidden.

The following example demonstrates how to set the value of the HorizontalScrollBarVisibility property by using Extensible Application Markup Language (XAML).

<TextBox TextWrapping="Wrap"
         Name="myTextBox" 
         Width="500" 
         Height="200" 
         AcceptsReturn="True"
         IsUndoEnabled="True"
         VerticalScrollBarVisibility="Visible"
         HorizontalScrollBarVisibility="Auto" 
         Margin="25">

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft