TextBoxes.xaml 1.6 KB

123456789101112131415161718192021222324252627
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  3. <ControlTemplate x:Key="SearchTextBoxTemplate" TargetType="{x:Type TextBoxBase}">
  4. <Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
  5. <Grid>
  6. <Grid.ColumnDefinitions>
  7. <ColumnDefinition Width="*"></ColumnDefinition>
  8. <ColumnDefinition Width="36"></ColumnDefinition>
  9. </Grid.ColumnDefinitions>
  10. <ScrollViewer Grid.Column="0" x:Name="PART_ContentHost" Focusable="False" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  11. <Image Grid.Column="1" Source="/Resources/Images/search.png" Margin="5 2 5 2"></Image>
  12. </Grid>
  13. </Border>
  14. <ControlTemplate.Triggers>
  15. <Trigger Property="IsEnabled" Value="False">
  16. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  17. </Trigger>
  18. <Trigger Property="IsMouseOver" Value="True">
  19. <Setter Property="BorderBrush" TargetName="border" Value="#FF7EB4EA"/>
  20. </Trigger>
  21. <Trigger Property="IsKeyboardFocused" Value="True">
  22. <Setter Property="BorderBrush" TargetName="border" Value="#FF569DE5"/>
  23. </Trigger>
  24. </ControlTemplate.Triggers>
  25. </ControlTemplate>
  26. </ResourceDictionary>