-
Notifications
You must be signed in to change notification settings - Fork 0
/
WarningButtons.xaml
44 lines (43 loc) · 2.74 KB
/
WarningButtons.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style BasedOn="{StaticResource {x:Type Button}}"
TargetType="{x:Type Button}"
x:Key="ModernBtnWarning">
<Style.Setters>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="Border" CornerRadius="10"
Background="red"
Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
<Grid>
<ContentPresenter x:Name="ContentPresenter" Margin="5"
TextBlock.FontFamily="{DynamicResource Playfair Regular}"
TextBlock.FontSize="16"
TextBlock.Foreground="{DynamicResource LightBeige}"
TextBlock.TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
RecognizesAccessKey="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource LightBeige}"/>
<Setter TargetName="Border" Property="BorderBrush" Value="red"/>
<Setter TargetName="Border" Property="BorderThickness" Value="2"/>
<Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{DynamicResource BoldBlue}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Border" Property="Background" Value="{DynamicResource BoldBlue}"/>
<Setter TargetName="ContentPresenter" Property="TextBlock.Foreground" Value="{DynamicResource LightBeige}"/>
<Setter TargetName="Border" Property="BorderThickness" Value="2"/>
<Setter TargetName="Border" Property="Opacity" Value="0.8"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
</ResourceDictionary>