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 Extensible Application Markup Language (XAML)Extensible Application Markup Language (XAML)來設定屬性的值。The following example demonstrates how to set the value of the HorizontalScrollBarVisibility property by using Extensible Application Markup Language (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

適用於