-
-
Save Hypersapien/76bab281cca2d2f30dd2f70a04b0bfd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style x:Key="BaseButtonStyle" TargetType="{x:Type Button}" BasedOn="{x:Null}"> | |
<Setter Property="Foreground" Value="{StaticResource ButtonFontColor}"/> | |
<Setter Property="Padding" Value="3"/> | |
<Setter Property="FocusVisualStyle" Value="{DynamicResource NuclearButtonFocusVisual}"/> | |
<Setter Property="Template" Value="{DynamicResource ButtonTemplate}" /> | |
</Style> | |
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource BaseButtonStyle}" /> | |
<ControlTemplate x:Key="ButtonTemplate" TargetType="{x:Type Button}"> | |
<ControlTemplate.Resources> | |
<Storyboard x:Key="PressedOn"> | |
<DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0.84"/> | |
<DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0.65"/> | |
</Storyboard> | |
<Storyboard x:Key="PressedOff"> | |
<DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgroundPressed" Storyboard.TargetProperty="Opacity" To="0"/> | |
<DoubleAnimation Duration="00:00:00.4000000" Storyboard.TargetName="BackgoundPressed_Highlight" Storyboard.TargetProperty="Opacity" To="0"/> | |
</Storyboard> | |
</ControlTemplate.Resources> | |
<Grid x:Name="Grid"> | |
<Border x:Name="BackgroundPressed" Background="{StaticResource BtnPressFill}" BorderBrush="{StaticResource btnPressBorder}" BorderThickness="1" CornerRadius="3" Opacity="0"/> | |
<Border x:Name="BackgoundPressed_Highlight" Background="{StaticResource btnPressFillHighlight}" Margin="1" CornerRadius="2.5" Opacity="0"/> | |
</Grid> | |
<ControlTemplate.Triggers> | |
<Trigger Property="IsDefault" Value="True"> | |
<Setter Property="Opacity" TargetName="DefaultBorder" Value="1"/> | |
</Trigger> | |
<Trigger Property="IsPressed" Value="true"> | |
<Trigger.ExitActions> | |
<BeginStoryboard Storyboard="{StaticResource PressedOff}" /> | |
</Trigger.ExitActions> | |
<Trigger.EnterActions> | |
<BeginStoryboard Storyboard="{StaticResource PressedOn}"/> | |
</Trigger.EnterActions> | |
</Trigger> | |
</ControlTemplate.Triggers> | |
</ControlTemplate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Style TargetType="classes:TaskItemHyperlinkButton" BasedOn="{StaticResource BaseButtonStyle}"> | |
<Setter Property="Template" Value="{StaticResource ButtonTemplate}" /> | |
<Style.Triggers> | |
<Trigger Property="IsCurrent" Value="true"> | |
<Trigger.ExitActions> | |
<BeginStoryboard Storyboard="{StaticResource PressedOff}" /> | |
</Trigger.ExitActions> | |
<Trigger.EnterActions> | |
<BeginStoryboard Storyboard="{StaticResource PressedOn}"/> | |
</Trigger.EnterActions> | |
</Trigger> | |
</Style.Triggers> | |
</Style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment