-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomButton.xaml
56 lines (49 loc) · 2.68 KB
/
CustomButton.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
45
46
47
48
49
50
51
52
53
54
55
56
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RPGproject">
<Style TargetType="Button" x:Key="CustomButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate>
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="7*"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid x:Name="grid" Margin="0" Grid.RowSpan="2" Grid.Row="1">
<Border
BorderBrush="Black"
BorderThickness="1"
CornerRadius="6"
Background="DarkRed"/>
<Border Background="Black" Opacity="0.25" BorderBrush="Black" CornerRadius="10"/>
</Grid>
<Grid Margin="0" Grid.Row="0" Grid.RowSpan="2">
<Border
BorderBrush="{TemplateBinding Background}"
BorderThickness="1"
CornerRadius="6"
Background="{TemplateBinding Background}"/>
<ContentPresenter>
<TextBlock
FontFamily="/Assets/Fonts/Vecna.otf#Vecna"
SelectionHighlightColor="{TemplateBinding Foreground}"
FontSize="{TemplateBinding FontSize}"
Foreground="White"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Height="Auto"
Width="Auto"
Text="{Binding Content, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
</ContentPresenter>
</Grid>
</Grid>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>