-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.xaml
109 lines (105 loc) · 5.83 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<Application x:Class="QuickTasks.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:QuickTasks"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!--main colors-->
<SolidColorBrush x:Key="fgColor" Color="NavajoWhite" />
<SolidColorBrush x:Key="bgColor" Color="#FF33343B" />
<SolidColorBrush x:Key="nColor" Color="DarkRed" />
<SolidColorBrush x:Key="yColor" Color="DarkGreen" />
<SolidColorBrush x:Key="dfgColor" Color="LightGray" />
<SolidColorBrush x:Key="dbgColor" Color="#FF999999" />
<SolidColorBrush x:Key="Transparent" Color="Transparent" />
<!--Window style-->
<Style x:Key="WindowStyle" TargetType="{x:Type Window}">
<Setter Property="Width" Value="250" />
<Setter Property="SizeToContent" Value="Height" />
<Setter Property="Foreground" Value="{StaticResource fgColor}"/>
<Setter Property="Background" Value="{StaticResource bgColor}"/>
<Setter Property="ResizeMode" Value="NoResize" />
<Setter Property="WindowStyle" Value="None" />
<Setter Property="BorderThickness" Value="0" />
</Style>
<!--Duplication: UserControls are not Windows (aw c'mon!...)-->
<Style x:Key="UCStyle" TargetType="{x:Type UserControl}">
<Setter Property="Foreground" Value="{StaticResource fgColor}"/>
<Setter Property="Background" Value="{StaticResource bgColor}"/>
<Setter Property="BorderThickness" Value="0" />
</Style>
<!--Label styles-->
<Style x:Key="labelStyle" TargetType="{x:Type Label}">
<Setter Property="Foreground" Value="{StaticResource fgColor}"/>
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="FontFamily" Value="Segoe UI" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="Padding" Value="3 0 0 1" />
</Style>
<Style x:Key="titleStyle" TargetType="{x:Type Label}" BasedOn="{StaticResource labelStyle}" >
<Setter Property="FontSize" Value="9" />
<Setter Property="Padding" Value="5 0" />
</Style>
<Style x:Key="infoStyle" TargetType="{x:Type Label}" BasedOn="{StaticResource labelStyle}" >
<Setter Property="FontSize" Value="11" />
<Setter Property="Padding" Value="5 0" />
<Setter Property="Foreground" Value="Black" />
</Style>
<Style x:Key="chipStyle" TargetType="{x:Type Label}" BasedOn="{StaticResource infoStyle}" >
<Setter Property="FontSize" Value="9" />
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="AliceBlue" />
<Setter Property="Margin" Value="0 5 5 5" />
</Style>
<Style x:Key="dialogStyle" TargetType="{x:Type Label}" BasedOn="{StaticResource labelStyle}" >
<Setter Property="HorizontalAlignment" Value="Center" />
</Style>
<!--Button styles-->
<Style x:Key="buttonStyle" TargetType="{x:Type Button}">
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="{StaticResource fgColor}" />
<Setter Property="Background" Value="{StaticResource Transparent}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border Background="{TemplateBinding Background}" BorderBrush="Black" BorderThickness="0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="Foreground" Value="{StaticResource bgColor}" />
<Setter Property="Background" Value="{StaticResource fgColor}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{StaticResource dbgColor}" />
<Setter Property="Foreground" Value="{StaticResource dfgColor}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="NoBtnStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource buttonStyle}">
<Setter Property="Background" Value="{StaticResource nColor}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{StaticResource nColor}" />
<Setter Property="Background" Value="{StaticResource fgColor}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="YesBtnStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource buttonStyle}">
<Setter Property="Background" Value="{StaticResource yColor}" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{StaticResource yColor}" />
<Setter Property="Background" Value="{StaticResource fgColor}" />
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>