-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml
58 lines (54 loc) · 2.92 KB
/
App.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
57
58
<Application x:Class="KeyTrain.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:KeyTrain"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="TextBlock">
<Setter Property="FontFamily" Value="Monaco"/>
</Style>
<Style TargetType="Slider">
<Setter Property="TickPlacement" Value="BottomRight"/>
<Setter Property="SmallChange" Value="1"/>
<Setter Property="IsSnapToTickEnabled" Value="True"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Bottom"/>
<Setter Property="IsMoveToPointEnabled" Value="True"/>
<EventSetter Event="MouseWheel" Handler="Slider_MouseWheel"/>
</Style>
<Style TargetType="{x:Type Button}" x:Key="ButtonWithImage">
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="Button.Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="#FF7C7C7C">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="50" Height="50"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Button.IsMouseOver" Value="True">
<Setter Property="Button.Background" Value="#FF5F7DA0" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" Value="AliceBlue"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource ButtonWithImage}"/> <!-- No key -> default setting -->
<Style TargetType="{x:Type Button}" x:Key="ButtonWithImageAndText" BasedOn="{StaticResource ButtonWithImage}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" BorderThickness="1" BorderBrush="#FF7C7C7C">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Width="120" Height="50"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>