ToolBar.TextBoxStyleKey Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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
Nilai Properti
Kunci sumber daya yang mewakili gaya default untuk kotak teks pada toolbar.
Contoh
Contoh berikut menggunakan properti ini untuk membuat Style untuk kontrol TextBox pada 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>
Keterangan
Gunakan properti ini untuk mengubah gaya default kontrol TextBox pada ToolBar.
Penggunaan Atribut XAML
<
propertiobjek="{ToolBar.TextBoxStyleKey}"/>