|
|
@@ -13,14 +13,7 @@
|
|
|
</GradientStopCollection>
|
|
|
</LinearGradientBrush.GradientStops>
|
|
|
</LinearGradientBrush>
|
|
|
-
|
|
|
</Border.BorderBrush>
|
|
|
- <Border.Background>
|
|
|
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,0">
|
|
|
- <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
|
|
|
- <GradientStop Color="{DynamicResource ControlMediumColor}" Offset="1" />
|
|
|
- </LinearGradientBrush>
|
|
|
- </Border.Background>
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
<VisualStateGroup.Transitions>
|
|
|
@@ -46,7 +39,7 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Trigger>
|
|
|
- <!--多条件触发-->
|
|
|
+ <!--没有被按下,并且鼠标还在上方-->
|
|
|
<MultiTrigger>
|
|
|
<MultiTrigger.Conditions>
|
|
|
<!--被按下-->
|
|
|
@@ -55,9 +48,35 @@
|
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
|
</MultiTrigger.Conditions>
|
|
|
<Setter Property="Opacity" TargetName="Border" Value="0.8"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--被按下,并且鼠标还在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="True"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonPressBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--没有被按下,鼠标也不在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="False"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="False"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="Transparent"/>
|
|
|
</MultiTrigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
+
|
|
|
<!--皮肤按钮-->
|
|
|
<ControlTemplate x:Key="SkinCaptionButtonStyle" TargetType="{x:Type Button}">
|
|
|
<Border TextBlock.Foreground="{TemplateBinding Foreground}" x:Name="Border" CornerRadius="0" BorderThickness="0">
|
|
|
@@ -70,14 +89,7 @@
|
|
|
</GradientStopCollection>
|
|
|
</LinearGradientBrush.GradientStops>
|
|
|
</LinearGradientBrush>
|
|
|
-
|
|
|
</Border.BorderBrush>
|
|
|
- <Border.Background>
|
|
|
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,0">
|
|
|
- <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
|
|
|
- <GradientStop Color="{DynamicResource ControlMediumColor}" Offset="1" />
|
|
|
- </LinearGradientBrush>
|
|
|
- </Border.Background>
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
<VisualStateGroup.Transitions>
|
|
|
@@ -103,7 +115,7 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Trigger>
|
|
|
- <!--多条件触发-->
|
|
|
+ <!--没有被按下,并且鼠标还在上方-->
|
|
|
<MultiTrigger>
|
|
|
<MultiTrigger.Conditions>
|
|
|
<!--被按下-->
|
|
|
@@ -112,6 +124,31 @@
|
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
|
</MultiTrigger.Conditions>
|
|
|
<Setter Property="Opacity" TargetName="Border" Value="0.8"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--被按下,并且鼠标还在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="True"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonPressBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--没有被按下,鼠标也不在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="False"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="False"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="Transparent"/>
|
|
|
</MultiTrigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
@@ -130,60 +167,7 @@
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
</Border.BorderBrush>
|
|
|
- <Border.Background>
|
|
|
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,0">
|
|
|
- <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
|
|
|
- <GradientStop Color="{DynamicResource ControlMediumColor}" Offset="1" />
|
|
|
- </LinearGradientBrush>
|
|
|
- </Border.Background>
|
|
|
- <VisualStateManager.VisualStateGroups>
|
|
|
- <VisualStateGroup x:Name="CommonStates">
|
|
|
- <VisualStateGroup.Transitions>
|
|
|
- <VisualTransition GeneratedDuration="0:0:0.1" />
|
|
|
- <VisualTransition GeneratedDuration="0" To="Pressed" />
|
|
|
- </VisualStateGroup.Transitions>
|
|
|
- <VisualState x:Name="Normal" />
|
|
|
- <VisualState x:Name="MouseOver">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}"/>
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Pressed">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Disabled">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- </VisualStateGroup>
|
|
|
- </VisualStateManager.VisualStateGroups>
|
|
|
+
|
|
|
<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
|
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
|
@@ -201,7 +185,7 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Trigger>
|
|
|
- <!--多条件触发-->
|
|
|
+ <!--没有被按下,并且鼠标还在上方-->
|
|
|
<MultiTrigger>
|
|
|
<MultiTrigger.Conditions>
|
|
|
<!--被按下-->
|
|
|
@@ -210,6 +194,31 @@
|
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
|
</MultiTrigger.Conditions>
|
|
|
<Setter Property="Opacity" TargetName="Border" Value="0.8"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--被按下,并且鼠标还在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="True"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonPressBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--没有被按下,鼠标也不在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="False"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="False"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="Transparent"/>
|
|
|
</MultiTrigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
@@ -228,60 +237,7 @@
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
</Border.BorderBrush>
|
|
|
- <Border.Background>
|
|
|
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,0">
|
|
|
- <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
|
|
|
- <GradientStop Color="{DynamicResource ControlMediumColor}" Offset="1" />
|
|
|
- </LinearGradientBrush>
|
|
|
- </Border.Background>
|
|
|
- <VisualStateManager.VisualStateGroups>
|
|
|
- <VisualStateGroup x:Name="CommonStates">
|
|
|
- <VisualStateGroup.Transitions>
|
|
|
- <VisualTransition GeneratedDuration="0:0:0.1" />
|
|
|
- <VisualTransition GeneratedDuration="0" To="Pressed" />
|
|
|
- </VisualStateGroup.Transitions>
|
|
|
- <VisualState x:Name="Normal" />
|
|
|
- <VisualState x:Name="MouseOver">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}"/>
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Pressed">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Disabled">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- </VisualStateGroup>
|
|
|
- </VisualStateManager.VisualStateGroups>
|
|
|
+
|
|
|
<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
|
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
|
@@ -299,7 +255,7 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Trigger>
|
|
|
- <!--多条件触发-->
|
|
|
+ <!--没有被按下,并且鼠标还在上方-->
|
|
|
<MultiTrigger>
|
|
|
<MultiTrigger.Conditions>
|
|
|
<!--被按下-->
|
|
|
@@ -308,6 +264,31 @@
|
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
|
</MultiTrigger.Conditions>
|
|
|
<Setter Property="Opacity" TargetName="Border" Value="0.8"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--被按下,并且鼠标还在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="True"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonPressBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--没有被按下,鼠标也不在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="False"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="False"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="Transparent"/>
|
|
|
</MultiTrigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
@@ -326,60 +307,7 @@
|
|
|
</LinearGradientBrush>
|
|
|
|
|
|
</Border.BorderBrush>
|
|
|
- <Border.Background>
|
|
|
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,0">
|
|
|
- <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
|
|
|
- <GradientStop Color="{DynamicResource ControlMediumColor}" Offset="1" />
|
|
|
- </LinearGradientBrush>
|
|
|
- </Border.Background>
|
|
|
- <VisualStateManager.VisualStateGroups>
|
|
|
- <VisualStateGroup x:Name="CommonStates">
|
|
|
- <VisualStateGroup.Transitions>
|
|
|
- <VisualTransition GeneratedDuration="0:0:0.1" />
|
|
|
- <VisualTransition GeneratedDuration="0" To="Pressed" />
|
|
|
- </VisualStateGroup.Transitions>
|
|
|
- <VisualState x:Name="Normal" />
|
|
|
- <VisualState x:Name="MouseOver">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}"/>
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Pressed">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CaptionButtonPressBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Disabled">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- </VisualStateGroup>
|
|
|
- </VisualStateManager.VisualStateGroups>
|
|
|
+
|
|
|
<ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
|
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
|
@@ -397,7 +325,7 @@
|
|
|
</Setter.Value>
|
|
|
</Setter>
|
|
|
</Trigger>
|
|
|
- <!--多条件触发-->
|
|
|
+ <!--没有被按下,并且鼠标还在上方-->
|
|
|
<MultiTrigger>
|
|
|
<MultiTrigger.Conditions>
|
|
|
<!--被按下-->
|
|
|
@@ -406,6 +334,31 @@
|
|
|
<Condition Property="IsMouseOver" Value="True"/>
|
|
|
</MultiTrigger.Conditions>
|
|
|
<Setter Property="Opacity" TargetName="Border" Value="0.8"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--被按下,并且鼠标还在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="True"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CaptionButtonPressBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--没有被按下,鼠标也不在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="False"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="False"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="Transparent"/>
|
|
|
</MultiTrigger>
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
@@ -423,61 +376,7 @@
|
|
|
</LinearGradientBrush.GradientStops>
|
|
|
</LinearGradientBrush>
|
|
|
</Border.BorderBrush>
|
|
|
- <Border.Background>
|
|
|
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,0">
|
|
|
- <GradientStop Color="{DynamicResource ControlLightColor}" Offset="0" />
|
|
|
- <GradientStop Color="{DynamicResource ControlMediumColor}" Offset="1" />
|
|
|
- </LinearGradientBrush>
|
|
|
- </Border.Background>
|
|
|
- <VisualStateManager.VisualStateGroups>
|
|
|
- <VisualStateGroup x:Name="CommonStates">
|
|
|
- <VisualStateGroup.Transitions>
|
|
|
- <VisualTransition GeneratedDuration="0:0:0.1" />
|
|
|
- <VisualTransition GeneratedDuration="0" To="Pressed" />
|
|
|
- </VisualStateGroup.Transitions>
|
|
|
- <VisualState x:Name="Normal" />
|
|
|
- <VisualState x:Name="MouseOver">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CloseCaptionButtonBackgroundBrushBase}"/>
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CloseCaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CloseCaptionButtonBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Pressed">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CloseCaptionButtonPressedBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CloseCaptionButtonPressedBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="{DynamicResource CloseCaptionButtonPressedBackgroundBrushBase}" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- <VisualState x:Name="Disabled">
|
|
|
- <Storyboard>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="Border">
|
|
|
- <EasingColorKeyFrame KeyTime="0" Value="Transparent" />
|
|
|
- </ColorAnimationUsingKeyFrames>
|
|
|
- </Storyboard>
|
|
|
- </VisualState>
|
|
|
- </VisualStateGroup>
|
|
|
- </VisualStateManager.VisualStateGroups>
|
|
|
- <ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True" />
|
|
|
+ <ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
|
|
</Border>
|
|
|
<ControlTemplate.Triggers>
|
|
|
<Trigger Property="IsDefault" Value="true">
|
|
|
@@ -495,11 +394,7 @@
|
|
|
</Setter>
|
|
|
</Trigger>
|
|
|
|
|
|
- <!--被按下-->
|
|
|
- <Trigger Property="IsPressed" Value="True">
|
|
|
- <Setter Property="CornerRadius" TargetName="Border" Value="{DynamicResource CloseCornerRadius}"/>
|
|
|
- </Trigger>
|
|
|
- <!--多条件触发-->
|
|
|
+ <!--没有被按下,并且鼠标还在上方-->
|
|
|
<MultiTrigger>
|
|
|
<MultiTrigger.Conditions>
|
|
|
<!--被按下-->
|
|
|
@@ -509,10 +404,38 @@
|
|
|
</MultiTrigger.Conditions>
|
|
|
<Setter Property="CornerRadius" TargetName="Border" Value="{DynamicResource CloseCornerRadius}"/>
|
|
|
<Setter Property="Opacity" TargetName="Border" Value="0.8"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CloseCaptionButtonBackgroundBrush}"/>
|
|
|
</MultiTrigger>
|
|
|
- <Trigger Property="IsMouseOver" Value="False">
|
|
|
+
|
|
|
+
|
|
|
+ <!--被按下,并且鼠标还在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="True"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="True"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
<Setter Property="CornerRadius" TargetName="Border" Value="{DynamicResource CloseCornerRadius}"/>
|
|
|
- </Trigger>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="{DynamicResource CloseCaptionButtonPressedBackgroundBrush}"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+ <!--没有被按下,鼠标也不在上方-->
|
|
|
+ <MultiTrigger>
|
|
|
+ <MultiTrigger.Conditions>
|
|
|
+ <!--被按下-->
|
|
|
+ <Condition Property="IsPressed" Value="False"/>
|
|
|
+ <!--鼠标在上方-->
|
|
|
+ <Condition Property="IsMouseOver" Value="False"/>
|
|
|
+ </MultiTrigger.Conditions>
|
|
|
+ <Setter Property="CornerRadius" TargetName="Border" Value="{DynamicResource CloseCornerRadius}"/>
|
|
|
+ <Setter Property="Background" TargetName="Border" Value="Transparent"/>
|
|
|
+ </MultiTrigger>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
</ControlTemplate.Triggers>
|
|
|
</ControlTemplate>
|
|
|
+
|
|
|
</ResourceDictionary>
|