整理代码
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:assists="clr-namespace:Melskin.Assists"
|
||||
xmlns:controls="clr-namespace:Melskin.Controls"
|
||||
xmlns:decorations="clr-namespace:Melskin.Controls.Decorations"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
xmlns:decorations="clr-namespace:Melskin.Controls.Decorations">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/Melskin;component/Themes/Animations.xaml" />
|
||||
<ResourceDictionary Source="/Melskin;component/Controls/IconElement.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
<ControlTemplate TargetType="{x:Type PasswordBox}" x:Key="SlotPasswordBoxTemplate">
|
||||
<ControlTemplate x:Key="SlotPasswordBoxTemplate" TargetType="{x:Type PasswordBox}">
|
||||
<decorations:SlotBorder
|
||||
x:Name="slot"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Intensity="0.2"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True"
|
||||
x:Name="slot">
|
||||
SnapsToDevicePixels="True">
|
||||
<Grid>
|
||||
<TextBlock
|
||||
x:Name="Placeholder"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
Foreground="{DynamicResource TextPlaceholderBrush}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="5,0,0,0"
|
||||
Text="{TemplateBinding assists:InputAssist.PlaceholderText}"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
x:Name="Placeholder" />
|
||||
Visibility="Collapsed" />
|
||||
<ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
Focusable="False"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
VerticalScrollBarVisibility="Hidden"
|
||||
x:Name="PART_ContentHost" />
|
||||
VerticalScrollBarVisibility="Hidden" />
|
||||
</Grid>
|
||||
</decorations:SlotBorder>
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextDisabledBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
|
||||
<Setter Property="ShaderEnabled" TargetName="slot" Value="False" />
|
||||
<Setter TargetName="slot" Property="ShaderEnabled" Value="False" />
|
||||
</Trigger>
|
||||
<Trigger Property="assists:InputAssist.HasPassword" Value="False">
|
||||
<Setter Property="Visibility" TargetName="Placeholder" Value="Visible" />
|
||||
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<!--<Trigger Property="IsMouseOver" Value="True" />-->
|
||||
|
||||
@@ -70,35 +70,35 @@
|
||||
</MultiTrigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate TargetType="{x:Type PasswordBox}" x:Key="SlotPasswordBoxEyeableTemplate">
|
||||
<ControlTemplate x:Key="SlotPasswordBoxEyeableTemplate" TargetType="{x:Type PasswordBox}">
|
||||
<ControlTemplate.Resources>
|
||||
<!-- 聚焦对象 -->
|
||||
<Storyboard x:Key="TextBox.FocusEffect">
|
||||
<DoubleAnimation
|
||||
Duration="0:0:0.2"
|
||||
Storyboard.TargetName="slot"
|
||||
Storyboard.TargetProperty="Intensity"
|
||||
To="0.5" />
|
||||
To="0.5"
|
||||
Duration="0:0:0.2" />
|
||||
</Storyboard>
|
||||
<!-- 取消聚焦对象 -->
|
||||
<Storyboard x:Key="TextBox.LeaveEffect">
|
||||
<DoubleAnimation
|
||||
Duration="0:0:0.2"
|
||||
Storyboard.TargetName="slot"
|
||||
Storyboard.TargetProperty="Intensity"
|
||||
To="0.2" />
|
||||
To="0.2"
|
||||
Duration="0:0:0.2" />
|
||||
</Storyboard>
|
||||
</ControlTemplate.Resources>
|
||||
<Grid>
|
||||
<decorations:SlotBorder
|
||||
x:Name="slot"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Intensity="0.2"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True"
|
||||
UseLayoutRounding="True"
|
||||
x:Name="slot">
|
||||
UseLayoutRounding="True">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- Prefix -->
|
||||
@@ -112,56 +112,56 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Prefix -->
|
||||
<ContentPresenter
|
||||
Content="{TemplateBinding assists:InputAssist.Prefix}"
|
||||
Focusable="False"
|
||||
x:Name="Prefix"
|
||||
Grid.Column="0"
|
||||
Margin="1,0,5,0"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
x:Name="Prefix" />
|
||||
Content="{TemplateBinding assists:InputAssist.Prefix}"
|
||||
Focusable="False" />
|
||||
<!-- Placeholder -->
|
||||
<TextBlock
|
||||
x:Name="Placeholder"
|
||||
Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
Foreground="{DynamicResource TextPlaceholderBrush}"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="5,0,0,0"
|
||||
Text="{TemplateBinding assists:InputAssist.PlaceholderText}"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
x:Name="Placeholder" />
|
||||
Visibility="Collapsed" />
|
||||
<!-- Input -->
|
||||
<!-- ScrollViewer will automatically handle padding, so you need to change the margin to a negative value. -->
|
||||
<ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
Grid.Column="1"
|
||||
Background="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Grid.Column="1"
|
||||
IsTabStop="False"
|
||||
x:Name="PART_ContentHost" />
|
||||
IsTabStop="False" />
|
||||
<!-- Password Text Box -->
|
||||
<TextBox
|
||||
Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"
|
||||
x:Name="PART_TextBox"
|
||||
Grid.Column="1"
|
||||
Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"
|
||||
IsTabStop="False"
|
||||
Style="{DynamicResource FlattenTextBoxStyle}"
|
||||
Text="{Binding Path=(assists:InputAssist.Password), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="Collapsed"
|
||||
x:Name="PART_TextBox" />
|
||||
Visibility="Collapsed" />
|
||||
<!-- 清空按钮 -->
|
||||
<controls:IconElement
|
||||
x:Name="CloseIcon"
|
||||
Grid.Column="2"
|
||||
Style="{DynamicResource ToolIcon}"
|
||||
Symbol="Close"
|
||||
Visibility="Collapsed"
|
||||
x:Name="CloseIcon" />
|
||||
Visibility="Collapsed" />
|
||||
<!-- Eye -->
|
||||
<ToggleButton
|
||||
x:Name="PART_Eye"
|
||||
Grid.Column="3"
|
||||
IsHitTestVisible="True"
|
||||
IsTabStop="False"
|
||||
Margin="5,0,1,0"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Visibility="Collapsed"
|
||||
x:Name="PART_Eye">
|
||||
IsHitTestVisible="True"
|
||||
IsTabStop="False"
|
||||
Visibility="Collapsed">
|
||||
<ToggleButton.Style>
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Opacity" Value="0.65" />
|
||||
@@ -188,9 +188,9 @@
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>-->
|
||||
<controls:IconElement
|
||||
Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=ToggleButton}}"
|
||||
x:Name="EyeIcon"
|
||||
VerticalAlignment="Center"
|
||||
x:Name="EyeIcon">
|
||||
Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=ToggleButton}}">
|
||||
<controls:IconElement.Style>
|
||||
<Style BasedOn="{StaticResource IconElementStyle}" TargetType="{x:Type controls:IconElement}">
|
||||
<Setter Property="Symbol" Value="Visibility" />
|
||||
@@ -227,19 +227,19 @@
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="assists:InputAssist.HasPassword" Value="False">
|
||||
<Setter Property="Visibility" TargetName="Placeholder" Value="Visible" />
|
||||
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextDisabledBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ControlBackgroundDisabledBrush}" />
|
||||
<Setter Property="ShaderEnabled" TargetName="slot" Value="False" />
|
||||
<Setter TargetName="slot" Property="ShaderEnabled" Value="False" />
|
||||
</Trigger>
|
||||
<!-- Prefix -->
|
||||
<Trigger Property="Content" SourceName="Prefix" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="Prefix" Value="Collapsed" />
|
||||
<Trigger SourceName="Prefix" Property="Content" Value="{x:Null}">
|
||||
<Setter TargetName="Prefix" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="Visibility" SourceName="Placeholder" Value="Collapsed">
|
||||
<Setter Property="Visibility" TargetName="PART_Eye" Value="Visible" />
|
||||
<Trigger SourceName="Placeholder" Property="Visibility" Value="Collapsed">
|
||||
<Setter TargetName="PART_Eye" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<MultiTrigger>
|
||||
<!-- 可清空 -->
|
||||
@@ -247,15 +247,15 @@
|
||||
<Condition Property="assists:InputAssist.Clearable" Value="True" />
|
||||
<Condition Property="assists:InputAssist.HasPassword" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Visibility" TargetName="CloseIcon" Value="Visible" />
|
||||
<Setter Property="assists:InputAssist.ClearEnabled" TargetName="CloseIcon" Value="True" />
|
||||
<Setter TargetName="CloseIcon" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="CloseIcon" Property="assists:InputAssist.ClearEnabled" Value="True" />
|
||||
</MultiTrigger>
|
||||
<!--<Trigger SourceName="PART_TextBox" Property="IsFocused" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryNormalBrush}" />
|
||||
</Trigger>-->
|
||||
<Trigger Property="IsChecked" SourceName="PART_Eye" Value="True">
|
||||
<Setter Property="Visibility" TargetName="PART_TextBox" Value="Visible" />
|
||||
<Setter Property="Visibility" TargetName="PART_ContentHost" Value="Collapsed" />
|
||||
<Trigger SourceName="PART_Eye" Property="IsChecked" Value="True">
|
||||
<Setter TargetName="PART_TextBox" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="PART_ContentHost" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
|
||||
<MultiTrigger>
|
||||
@@ -295,7 +295,7 @@
|
||||
</Trigger>-->
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
<Style TargetType="PasswordBox" x:Key="SlotPasswordBoxStyle">
|
||||
<Style x:Key="SlotPasswordBoxStyle" TargetType="PasswordBox">
|
||||
<Setter Property="PasswordChar" Value="●" />
|
||||
<Setter Property="Background" Value="{DynamicResource ControlBackgroundNormalBrush}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
@@ -319,30 +319,30 @@
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<ControlTemplate TargetType="{x:Type PasswordBox}" x:Key="PasswordBoxTemplate">
|
||||
<ControlTemplate x:Key="PasswordBoxTemplate" TargetType="{x:Type PasswordBox}">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding assists:ControlAssist.CornerRadius}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True"
|
||||
x:Name="Border">
|
||||
SnapsToDevicePixels="True">
|
||||
<Grid>
|
||||
<TextBlock
|
||||
x:Name="Placeholder"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
Foreground="{DynamicResource TextPlaceholderBrush}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="5,0,0,0"
|
||||
Text="{TemplateBinding assists:InputAssist.PlaceholderText}"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
x:Name="Placeholder" />
|
||||
Visibility="Collapsed" />
|
||||
<ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
Focusable="False"
|
||||
HorizontalScrollBarVisibility="Hidden"
|
||||
VerticalScrollBarVisibility="Hidden"
|
||||
x:Name="PART_ContentHost" />
|
||||
VerticalScrollBarVisibility="Hidden" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -361,13 +361,13 @@
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsFocused" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource PrimaryNormalBrush}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource PrimaryNormalBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ControlBackgroundHoverBrush}" />
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlBackgroundHoverBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="assists:InputAssist.HasPassword" Value="False">
|
||||
<Setter Property="Visibility" TargetName="Placeholder" Value="Visible" />
|
||||
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<!--<Trigger Property="IsKeyboardFocused" Value="True" />-->
|
||||
|
||||
@@ -375,17 +375,17 @@
|
||||
</ControlTemplate>
|
||||
|
||||
|
||||
<ControlTemplate TargetType="{x:Type PasswordBox}" x:Key="PasswordBoxEyeableTemplate">
|
||||
<ControlTemplate x:Key="PasswordBoxEyeableTemplate" TargetType="{x:Type PasswordBox}">
|
||||
<Grid>
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
CornerRadius="{TemplateBinding assists:ControlAssist.CornerRadius}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
SnapsToDevicePixels="True"
|
||||
UseLayoutRounding="True"
|
||||
x:Name="Border">
|
||||
UseLayoutRounding="True">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!-- Prefix -->
|
||||
@@ -397,49 +397,49 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Prefix -->
|
||||
<ContentPresenter
|
||||
Content="{TemplateBinding assists:InputAssist.Prefix}"
|
||||
Focusable="False"
|
||||
x:Name="Prefix"
|
||||
Grid.Column="0"
|
||||
Margin="1,0,5,0"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
x:Name="Prefix" />
|
||||
Content="{TemplateBinding assists:InputAssist.Prefix}"
|
||||
Focusable="False" />
|
||||
<!-- Placeholder -->
|
||||
<TextBlock
|
||||
x:Name="Placeholder"
|
||||
Grid.Column="1"
|
||||
Margin="5,0,0,0"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="Center"
|
||||
Focusable="False"
|
||||
Foreground="{DynamicResource TextPlaceholderBrush}"
|
||||
Grid.Column="1"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
Margin="5,0,0,0"
|
||||
Text="{TemplateBinding assists:InputAssist.PlaceholderText}"
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
x:Name="Placeholder" />
|
||||
Visibility="Collapsed" />
|
||||
<!-- Input -->
|
||||
<!-- ScrollViewer will automatically handle padding, so you need to change the margin to a negative value. -->
|
||||
<ScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
Grid.Column="1"
|
||||
Background="{x:Null}"
|
||||
BorderThickness="0"
|
||||
Grid.Column="1"
|
||||
IsTabStop="False"
|
||||
x:Name="PART_ContentHost" />
|
||||
IsTabStop="False" />
|
||||
<!-- Password Text Box -->
|
||||
<TextBox
|
||||
Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"
|
||||
x:Name="PART_TextBox"
|
||||
Grid.Column="1"
|
||||
Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"
|
||||
IsTabStop="False"
|
||||
Style="{DynamicResource FlattenTextBoxStyle}"
|
||||
Text="{Binding Path=(assists:InputAssist.Password), Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Visibility="Collapsed"
|
||||
x:Name="PART_TextBox" />
|
||||
Visibility="Collapsed" />
|
||||
<!-- Eye -->
|
||||
<ToggleButton
|
||||
x:Name="PART_Eye"
|
||||
Grid.Column="2"
|
||||
IsHitTestVisible="True"
|
||||
IsTabStop="False"
|
||||
Margin="5,0,1,0"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Visibility="Collapsed"
|
||||
x:Name="PART_Eye">
|
||||
IsHitTestVisible="True"
|
||||
IsTabStop="False"
|
||||
Visibility="Collapsed">
|
||||
<ToggleButton.Style>
|
||||
<Style TargetType="{x:Type ToggleButton}">
|
||||
<Setter Property="Opacity" Value="0.65" />
|
||||
@@ -448,9 +448,9 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<controls:IconElement
|
||||
Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=ToggleButton}}"
|
||||
x:Name="EyeIcon"
|
||||
VerticalAlignment="Center"
|
||||
x:Name="EyeIcon">
|
||||
Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=ToggleButton}}">
|
||||
<controls:IconElement.Style>
|
||||
<Style BasedOn="{StaticResource IconElementStyle}" TargetType="{x:Type controls:IconElement}">
|
||||
<Setter Property="Symbol" Value="Visibility" />
|
||||
@@ -487,7 +487,7 @@
|
||||
<Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="assists:InputAssist.HasPassword" Value="False">
|
||||
<Setter Property="Visibility" TargetName="Placeholder" Value="Visible" />
|
||||
<Setter TargetName="Placeholder" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextDisabledBrush}" />
|
||||
@@ -495,22 +495,22 @@
|
||||
<Setter Property="Cursor" Value="None" />
|
||||
</Trigger>
|
||||
<!-- Prefix -->
|
||||
<Trigger Property="Content" SourceName="Prefix" Value="{x:Null}">
|
||||
<Setter Property="Visibility" TargetName="Prefix" Value="Collapsed" />
|
||||
<Trigger SourceName="Prefix" Property="Content" Value="{x:Null}">
|
||||
<Setter TargetName="Prefix" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
<Trigger Property="Visibility" SourceName="Placeholder" Value="Collapsed">
|
||||
<Setter Property="Visibility" TargetName="PART_Eye" Value="Visible" />
|
||||
<Trigger SourceName="Placeholder" Property="Visibility" Value="Collapsed">
|
||||
<Setter TargetName="PART_Eye" Property="Visibility" Value="Visible" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsFocused" Value="True">
|
||||
<Setter Property="BorderBrush" TargetName="Border" Value="{DynamicResource PrimaryNormalBrush}" />
|
||||
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource PrimaryNormalBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource ControlBackgroundHoverBrush}" />
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlBackgroundHoverBrush}" />
|
||||
</Trigger>
|
||||
|
||||
<Trigger Property="IsChecked" SourceName="PART_Eye" Value="True">
|
||||
<Setter Property="Visibility" TargetName="PART_TextBox" Value="Visible" />
|
||||
<Setter Property="Visibility" TargetName="PART_ContentHost" Value="Collapsed" />
|
||||
<Trigger SourceName="PART_Eye" Property="IsChecked" Value="True">
|
||||
<Setter TargetName="PART_TextBox" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="PART_ContentHost" Property="Visibility" Value="Collapsed" />
|
||||
</Trigger>
|
||||
|
||||
</ControlTemplate.Triggers>
|
||||
|
||||
Reference in New Issue
Block a user