|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | | - xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"> |
| 3 | + xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" |
| 4 | + xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"> |
4 | 5 | <Style x:Key="DefaultTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource MetroTextBox}"> |
5 | 6 | <Setter Property="FontSize" Value="14" /> |
6 | 7 | <Setter Property="ContextMenu" Value="{StaticResource CutCopyPasteContextMenu}" /> |
|
10 | 11 | <!-- Apply the default design to all text boxes --> |
11 | 12 | <Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource DefaultTextBox}" /> |
12 | 13 |
|
| 14 | + <Style x:Key="SearchTextBox" TargetType="{x:Type TextBox}" BasedOn="{StaticResource SearchMetroTextBox}"> |
| 15 | + <Setter Property="FontSize" Value="14" /> |
| 16 | + <Setter Property="BorderBrush" Value="{DynamicResource GrayBrush8}" /> |
| 17 | + <Setter Property="BorderThickness" Value="1" /> |
| 18 | + <Setter Property="ContextMenu" Value="{StaticResource CutCopyPasteContextMenu}" /> |
| 19 | + <Setter Property="Validation.ErrorTemplate" Value="{StaticResource DefaultErrorTemplate}" /> |
| 20 | + <Setter Property="mah:TextBoxHelper.Watermark" Value="{DynamicResource String_Watermark_Search}" /> |
| 21 | + <Setter Property="Controls:TextBoxHelper.ClearTextButton" Value="True" /> |
| 22 | + <Style.Triggers> |
| 23 | + <Trigger Property="Controls:TextBoxHelper.HasText" Value="True"> |
| 24 | + <Setter Property="Controls:TextBoxHelper.ButtonContentTemplate" Value="{x:Null}" /> |
| 25 | + </Trigger> |
| 26 | + </Style.Triggers> |
| 27 | + </Style> |
| 28 | + |
13 | 29 | <Style x:Key="TextBlockAsTextBox" TargetType="{x:Type TextBox}" > |
14 | 30 | <Setter Property="FontSize" Value="14" /> |
15 | 31 | <Setter Property="FontWeight" Value="Bold" /> |
|
0 commit comments