|
1642 | 1642 |
|
1643 | 1643 | <Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button" />
|
1644 | 1644 |
|
| 1645 | + <Style |
| 1646 | + x:Key="AccentButtonStyle" |
| 1647 | + BasedOn="{StaticResource DefaultButtonStyle}" |
| 1648 | + TargetType="Button"> |
| 1649 | + <Setter Property="Foreground" Value="{DynamicResource AccentButtonForeground}" /> |
| 1650 | + <Setter Property="Background" Value="{DynamicResource AccentButtonBackground}" /> |
| 1651 | + <Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrush}" /> |
| 1652 | + <Setter Property="Template"> |
| 1653 | + <Setter.Value> |
| 1654 | + <ControlTemplate TargetType="Button"> |
| 1655 | + |
| 1656 | + <Border |
| 1657 | + x:Name="Background" |
| 1658 | + Background="{TemplateBinding Background}" |
| 1659 | + CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" |
| 1660 | + SnapsToDevicePixels="True"> |
| 1661 | + <Border x:Name="Overlay"> |
| 1662 | + <Border |
| 1663 | + x:Name="Border" |
| 1664 | + Margin="1" |
| 1665 | + Padding="{TemplateBinding Padding}" |
| 1666 | + BorderBrush="{TemplateBinding BorderBrush}" |
| 1667 | + BorderThickness="0 0 0 1" |
| 1668 | + CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"> |
| 1669 | + <ContentPresenter |
| 1670 | + x:Name="ContentPresenter" |
| 1671 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 1672 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
| 1673 | + Focusable="False" |
| 1674 | + RecognizesAccessKey="True" |
| 1675 | + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
| 1676 | + TextElement.Foreground="{TemplateBinding Foreground}" /> |
| 1677 | + </Border> |
| 1678 | + </Border> |
| 1679 | + </Border> |
| 1680 | + <ControlTemplate.Triggers> |
| 1681 | + <Trigger Property="IsMouseOver" Value="True"> |
| 1682 | + <Setter TargetName="Background" Property="Background" Value="{DynamicResource AccentButtonBackgroundPointerOver}" /> |
| 1683 | + <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPointerOver}" /> |
| 1684 | + <Setter TargetName="Overlay" Property="Background" Value="{DynamicResource AccentButtonBorderBGPointerOver}" /> |
| 1685 | + <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource AccentButtonForegroundPointerOver}" /> |
| 1686 | + </Trigger> |
| 1687 | + <Trigger Property="IsPressed" Value="True"> |
| 1688 | + <Setter TargetName="Background" Property="Background" Value="{DynamicResource AccentButtonBackgroundPressed}" /> |
| 1689 | + <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPressed}" /> |
| 1690 | + <Setter TargetName="Overlay" Property="Background" Value="{DynamicResource AccentButtonBorderBGPressed}" /> |
| 1691 | + <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource AccentButtonForegroundPressed}" /> |
| 1692 | + </Trigger> |
| 1693 | + <Trigger Property="IsEnabled" Value="False"> |
| 1694 | + <Setter TargetName="Background" Property="Background" Value="{DynamicResource AccentButtonBackgroundDisabled}" /> |
| 1695 | + <Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushDisabled}" /> |
| 1696 | + <Setter TargetName="Overlay" Property="Background" Value="transparent" /> |
| 1697 | + <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource AccentButtonForegroundDisabled}" /> |
| 1698 | + </Trigger> |
| 1699 | + </ControlTemplate.Triggers> |
| 1700 | + </ControlTemplate> |
| 1701 | + </Setter.Value> |
| 1702 | + </Setter> |
| 1703 | + </Style> |
1645 | 1704 |
|
1646 | 1705 | <!-- - Custom Toggle Switch from modern wpf for left label -->
|
1647 | 1706 | <system:TimeSpan x:Key="RepositionDelay">0:0:0.033</system:TimeSpan>
|
|
0 commit comments