-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.xaml
More file actions
170 lines (164 loc) · 8.55 KB
/
Copy pathApp.xaml
File metadata and controls
170 lines (164 loc) · 8.55 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<Application x:Class="ColorPicker.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ColorPicker"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style x:Key="HoverBorderStyle" TargetType="Border">
<Setter Property="Background" Value="#0B0B0B"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#141414"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#141414" BlurRadius="10" ShadowDepth="0" Opacity="0.9"/>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
<!--Button-->
<Style x:Key="CustomButtonStyle" TargetType="Button">
<Setter Property="Background" Value="#0B0B0B"/>
<Setter Property="Padding" Value="10,5"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="10">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#141414"/>
<Setter TargetName="border" Property="Effect">
<Setter.Value>
<DropShadowEffect Color="#141414" BlurRadius="10" ShadowDepth="0" Opacity="0.9"/>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Color Display-->
<Style x:Key="HoverRectangleStyle" TargetType="Rectangle">
<Setter Property="Fill" Value="Transparent"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Style.Triggers>
<EventTrigger RoutedEvent="Rectangle.MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="StrokeThickness"
To="0.7"
Duration="0:0:0.0"/>
<ColorAnimation
Storyboard.TargetProperty="Stroke.(SolidColorBrush.Color)"
To="#fff"
Duration="0:0:0.0"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
<EventTrigger RoutedEvent="Rectangle.MouseLeave">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetProperty="StrokeThickness"
To="0"
Duration="0:0:0.15"/>
<ColorAnimation
Storyboard.TargetProperty="Stroke.(SolidColorBrush.Color)"
To="Transparent"
Duration="0:0:0.15"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</Style.Triggers>
</Style>
<!--Tooltip-->
<Style x:Key="CopiedTooltipStyle" TargetType="ToolTip">
<Setter Property="Background" Value="Black"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="Placement" Value="Mouse"/>
<Setter Property="PlacementTarget" Value="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"/>
<Setter Property="IsOpen" Value="True"/>
</Style>
<!--Red Slider-->
<Style x:Key="RedSliderStyle" TargetType="Slider">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid>
<Border x:Name="FillBorder" Panel.ZIndex="1" CornerRadius="2" Background="#cc0000" Height="4" HorizontalAlignment="Left"/>
<Border CornerRadius="2" VerticalAlignment="Center" Background="#1c1c1c" Height="4"/>
<Track x:Name="PART_Track" Panel.ZIndex="1">
<Track.Thumb>
<Thumb x:Name="PART_Thumb" Width="10" Height="10">
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Ellipse Fill="#cc0000" StrokeThickness="0"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Green Slider-->
<Style x:Key="GreenSliderStyle" TargetType="Slider">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid>
<Border x:Name="FillBorder" Panel.ZIndex="1" CornerRadius="2" Background="#00c70d" Height="4" HorizontalAlignment="Left"/>
<Border CornerRadius="2" VerticalAlignment="Center" Background="#1c1c1c" Height="4"/>
<Track x:Name="PART_Track" Panel.ZIndex="1">
<Track.Thumb>
<Thumb x:Name="PART_Thumb" Width="10" Height="10">
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Ellipse Fill="#00c70d" StrokeThickness="0"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<!--Blue Slider-->
<Style x:Key="BlueSliderStyle" TargetType="Slider">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Slider">
<Grid>
<Border x:Name="FillBorder" Panel.ZIndex="1" CornerRadius="2" Background="Blue" Height="4" HorizontalAlignment="Left"/>
<Border CornerRadius="2" VerticalAlignment="Center" Background="#1c1c1c" Height="4"/>
<Track x:Name="PART_Track" Panel.ZIndex="1">
<Track.Thumb>
<Thumb x:Name="PART_Thumb" Width="10" Height="10">
<Thumb.Template>
<ControlTemplate TargetType="Thumb">
<Ellipse Fill="Blue" StrokeThickness="0"/>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Track.Thumb>
</Track>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Application.Resources>
</Application>