Added source code.

This commit is contained in:
2018-02-06 01:24:46 +02:00
parent 1d9f2990c8
commit 8b28da5b80
367 changed files with 22964 additions and 0 deletions

View File

@ -0,0 +1,43 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="SearchBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="MinHeight" Value="20" />
<Setter Property="MinWidth" Value="100" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Border Name="border"
Background="White"
BorderBrush="White" BorderThickness="1"
Padding="4,2,4,2">
<Grid>
<TextBlock Name="text" Visibility="Hidden"
VerticalAlignment="Center"
Foreground="Gray"
FontStyle="Italic">Search</TextBlock>
<ScrollViewer VerticalAlignment="Center" x:Name="PART_ContentHost" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="Text" Value="">
<Setter TargetName="text" Property="Visibility" Value="Visible" />
</Trigger>
<Trigger Property="IsFocused" Value="True">
<Setter TargetName="text" Property="Visibility" Value="Hidden" />
<Setter TargetName="border" Property="BorderBrush" Value="DodgerBlue" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="DodgerBlue" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>