12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style TargetType="TextBox">
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="Height" Value="40"/>
- <Setter Property="Width" Value="250"/>
- <Setter Property="Background" Value="white"/>
- <Setter Property="Foreground" Value="#59A862"/>
- <Setter Property="FontWeight" Value="UltraLight"/>
- <Setter Property="Padding" Value="0 5 5 4"/>
- <Setter Property="Margin" Value="10 5"/>
- <Setter Property="Cursor" Value="IBeam"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Grid.Column" Value="1"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type TextBox}">
- <Border x:Name="TxtBorder"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="5"
- SnapsToDevicePixels="True">
- <Grid Margin="{TemplateBinding Padding}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <ScrollViewer x:Name="PART_ContentHost"
- Focusable="False"
- Grid.Column="1"
- Margin="5 0 0 0"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden"/>
- <Label x:Name="Watermark"
- FontFamily="Gabriela"
- FontSize="15"
- VerticalAlignment="Center"
- HorizontalAlignment="Left"
- Foreground="#59A862"
- Visibility="Collapsed"
- Padding="5 0 20 0"
- Content="{TemplateBinding Tag}"
- Grid.Column="1"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" Value="#498C51" TargetName="TxtBorder"/>
- <Setter Property="Control.Foreground" Value="#498C51"/>
- <Setter Property="Foreground" TargetName="Watermark" Value="#498C51"/>
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="True">
- <Setter Property="Control.Foreground" Value="#498C51"/>
- <Setter Property="BorderBrush" Value="#498C51" TargetName="TxtBorder"/>
- <Setter Property="Foreground" TargetName="Watermark" Value="#498C51"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Text" Value=""/>
- </MultiTrigger.Conditions>
- <Setter Property="Visibility" Value="Visible" TargetName="Watermark"/>
- </MultiTrigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
|