TextBoxBase.HorizontalScrollBarVisibility 属性

定义

获取或设置一个值,该值指示是否显示水平滚动条。Gets or sets a value that indicates whether a horizontal scroll bar is shown.

public:
 property System::Windows::Controls::ScrollBarVisibility HorizontalScrollBarVisibility { System::Windows::Controls::ScrollBarVisibility get(); void set(System::Windows::Controls::ScrollBarVisibility value); };
public System.Windows.Controls.ScrollBarVisibility HorizontalScrollBarVisibility { get; set; }
member this.HorizontalScrollBarVisibility : System.Windows.Controls.ScrollBarVisibility with get, set
Public Property HorizontalScrollBarVisibility As ScrollBarVisibility

属性值

ScrollBarVisibility 枚举定义的值。A value that is defined by the ScrollBarVisibility enumeration.

默认值为 HiddenThe default value is Hidden.

示例

下面的示例演示如何使用HorizontalScrollBarVisibility 可扩展应用程序标记语言 (XAML)Extensible Application Markup Language (XAML)设置属性的值。The following example demonstrates how to set the value of the HorizontalScrollBarVisibility property by using 可扩展应用程序标记语言 (XAML)Extensible Application Markup Language (XAML).

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

注解

依赖项属性信息Dependency Property Information

标识符字段Identifier field HorizontalScrollBarVisibilityProperty
元数据属性设置为trueMetadata properties set to true AffectsMeasure

适用于