-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommonStyles.xaml
82 lines (77 loc) · 3.86 KB
/
CommonStyles.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
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="ProgressBar">
<Setter Property="Foreground" Value="White" />
<!-- Change the ProgressBar's color to white -->
<Setter Property="Background" Value="#0d1e3b" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="Maximum" Value="100" />
<Setter Property="Minimum" Value="0" />
<Setter Property="Width" Value="40" />
<!-- Change the ProgressBar's background color to dark blue -->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ProgressBar">
<Grid>
<!-- Visual representation of the ProgressBar -->
<Rectangle
Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
RadiusX="5"
RadiusY="5">
<Rectangle.Fill>
<SolidColorBrush Color="{TemplateBinding Background}" />
<!-- Use the Background property as the fill color -->
</Rectangle.Fill>
</Rectangle>
<Rectangle
Margin="0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
RadiusX="5"
RadiusY="5">
<Rectangle.Fill>
<SolidColorBrush Color="{TemplateBinding Foreground}" />
<!-- Use the Foreground property as the progress color -->
</Rectangle.Fill>
<Rectangle.Width>
<Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" />
</Rectangle.Width>
</Rectangle>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, Mode=OneWay, StringFormat={}{0}%}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="Border">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#11274d" />
<Setter Property="CornerRadius" Value="10" />
</Style>
<Style x:Key="RectangleStyle" TargetType="Rectangle">
<Setter Property="Width" Value="150" />
<Setter Property="Height" Value="160" />
<Setter Property="Fill" Value="#0a162b" />
<Setter Property="RadiusX" Value="5" />
<Setter Property="RadiusY" Value="5" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="LabelStyle" TargetType="Label">
<Setter Property="Foreground" Value="white" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontFamily" Value="Arial" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
<Style x:Key="Chk" TargetType="CheckBox">
<Setter Property="Foreground" Value="white" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</ResourceDictionary>