語言

ToolBar.TextBoxStyleKey 屬性

定義

public:
 static property System::Windows::ResourceKey ^ TextBoxStyleKey { System::Windows::ResourceKey ^ get(); };
public static System.Windows.ResourceKey TextBoxStyleKey { get; }
static member TextBoxStyleKey : System.Windows.ResourceKey
Public Shared ReadOnly Property TextBoxStyleKey As ResourceKey

屬性值

一個資源鍵,代表工具列文字框的預設樣式。

範例

以下範例利用此特性為 在 上Style建立 a TextBox 的ToolBar控制。

<Style x:Key="{x:Static ToolBar.TextBoxStyleKey}" TargetType="TextBox">
  <Setter Property="Background" Value="DarkBlue"/>
  <Setter Property="Foreground" Value="White"/>
  <Setter Property="FontSize" Value="14"/>
  <Setter Property="FontStyle" Value="Italic"/>
  <Setter Property="HorizontalAlignment" Value="Center"/>
  <Setter Property="VerticalAlignment" Value="Center"/>
  <Setter Property="Width" Value="75"/>
</Style>

備註

使用此屬性來更改 TextBoxToolBar.

XAML 屬性使用方式

< objectproperty=“{ToolBar.TextBoxStyleKey}"/>

適用於