-
Notifications
You must be signed in to change notification settings - Fork 0
/
Office2007ColorTable.cs
386 lines (346 loc) · 12.2 KB
/
Office2007ColorTable.cs
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
/********************************************************************/
/* Office 2007 Renderer Project */
/* */
/* Use the Office2007Renderer class as a custom renderer by */
/* providing it to the ToolStripManager.Renderer property. Then */
/* all tool strips, menu strips, status strips etc will be drawn */
/* using the Office 2007 style renderer in your application. */
/* */
/* Author: Phil Wright */
/* Website: www.componentfactory.com */
/* Contact: [email protected] */
/********************************************************************/
using System.Drawing;
using System.Windows.Forms;
namespace Office2007Rendering
{
/// <summary>
/// Provide Office 2007 Blue Theme colors
/// </summary>
public class Office2007ColorTable : ProfessionalColorTable
{
#region Static Fixed Colors - Blue Color Scheme
private static readonly Color _contextMenuBack = Color.FromArgb(red: 250, green: 250, blue: 250);
private static readonly Color _buttonPressedBegin = Color.FromArgb(red: 248, green: 181, blue: 106);
private static readonly Color _buttonPressedEnd = Color.FromArgb(red: 255, green: 208, blue: 134);
private static readonly Color _buttonPressedMiddle = Color.FromArgb(red: 251, green: 140, blue: 60);
private static readonly Color _buttonSelectedBegin = Color.FromArgb(red: 255, green: 255, blue: 222);
private static readonly Color _buttonSelectedEnd = Color.FromArgb(red: 255, green: 203, blue: 136);
private static readonly Color _buttonSelectedMiddle = Color.FromArgb(red: 255, green: 225, blue: 172);
private static readonly Color _menuItemSelectedBegin = Color.FromArgb(red: 255, green: 213, blue: 103);
private static readonly Color _menuItemSelectedEnd = Color.FromArgb(red: 255, green: 228, blue: 145);
private static readonly Color _checkBack = Color.FromArgb(red: 255, green: 227, blue: 149);
private static readonly Color _gripDark = Color.FromArgb(red: 111, green: 157, blue: 217);
private static readonly Color _gripLight = Color.FromArgb(red: 255, green: 255, blue: 255);
private static readonly Color _imageMargin = Color.FromArgb(red: 233, green: 238, blue: 238);
private static readonly Color _menuBorder = Color.FromArgb(red: 134, green: 134, blue: 134);
private static readonly Color _overflowBegin = Color.FromArgb(red: 167, green: 204, blue: 251);
private static readonly Color _overflowEnd = Color.FromArgb(red: 101, green: 147, blue: 207);
private static readonly Color _overflowMiddle = Color.FromArgb(red: 167, green: 204, blue: 251);
private static readonly Color _menuToolBack = Color.FromArgb(red: 191, green: 219, blue: 255);
private static readonly Color _separatorDark = Color.FromArgb(red: 154, green: 198, blue: 255);
private static readonly Color _separatorLight = Color.FromArgb(red: 255, green: 255, blue: 255);
private static readonly Color _statusStripLight = Color.FromArgb(red: 215, green: 229, blue: 247);
private static readonly Color _statusStripDark = Color.FromArgb(red: 172, green: 201, blue: 238);
private static readonly Color _toolStripBorder = Color.FromArgb(red: 111, green: 157, blue: 217);
private static readonly Color _toolStripContentEnd = Color.FromArgb(red: 164, green: 195, blue: 235);
private static readonly Color _toolStripBegin = Color.FromArgb(red: 227, green: 239, blue: 255);
private static readonly Color _toolStripEnd = Color.FromArgb(red: 152, green: 186, blue: 230);
private static readonly Color _toolStripMiddle = Color.FromArgb(red: 222, green: 236, blue: 255);
private static readonly Color _buttonBorder = Color.FromArgb(red: 121, green: 153, blue: 194);
#endregion
#region Identity
/// <summary>
/// Initialize a new instance of the Office2007ColorTable class.
/// </summary>
public Office2007ColorTable()
{
}
#endregion
#region ButtonPressed
/// <summary>
/// Gets the starting color of the gradient used when the button is pressed down.
/// </summary>
public override Color ButtonPressedGradientBegin
{
get { return _buttonPressedBegin; }
}
/// <summary>
/// Gets the end color of the gradient used when the button is pressed down.
/// </summary>
public override Color ButtonPressedGradientEnd
{
get { return _buttonPressedEnd; }
}
/// <summary>
/// Gets the middle color of the gradient used when the button is pressed down.
/// </summary>
public override Color ButtonPressedGradientMiddle
{
get { return _buttonPressedMiddle; }
}
#endregion
#region ButtonSelected
/// <summary>
/// Gets the starting color of the gradient used when the button is selected.
/// </summary>
public override Color ButtonSelectedGradientBegin
{
get { return _buttonSelectedBegin; }
}
/// <summary>
/// Gets the end color of the gradient used when the button is selected.
/// </summary>
public override Color ButtonSelectedGradientEnd
{
get { return _buttonSelectedEnd; }
}
/// <summary>
/// Gets the middle color of the gradient used when the button is selected.
/// </summary>
public override Color ButtonSelectedGradientMiddle
{
get { return _buttonSelectedMiddle; }
}
/// <summary>
/// Gets the border color to use with ButtonSelectedHighlight.
/// </summary>
public override Color ButtonSelectedHighlightBorder
{
get { return _buttonBorder; }
}
#endregion
#region Check
/// <summary>
/// Gets the solid color to use when the check box is selected and gradients are being used.
/// </summary>
public override Color CheckBackground
{
get { return _checkBack; }
}
#endregion
#region Grip
/// <summary>
/// Gets the color to use for shadow effects on the grip or move handle.
/// </summary>
public override Color GripDark
{
get { return _gripDark; }
}
/// <summary>
/// Gets the color to use for highlight effects on the grip or move handle.
/// </summary>
public override Color GripLight
{
get { return _gripLight; }
}
#endregion
#region ImageMargin
/// <summary>
/// Gets the starting color of the gradient used in the image margin of a ToolStripDropDownMenu.
/// </summary>
public override Color ImageMarginGradientBegin
{
get { return _imageMargin; }
}
#endregion
#region MenuBorder
/// <summary>
/// Gets the border color or a MenuStrip.
/// </summary>
public override Color MenuBorder
{
get { return _menuBorder; }
}
#endregion
#region MenuItem
/// <summary>
/// Gets the starting color of the gradient used when a top-level ToolStripMenuItem is pressed down.
/// </summary>
public override Color MenuItemPressedGradientBegin
{
get { return _toolStripBegin; }
}
/// <summary>
/// Gets the end color of the gradient used when a top-level ToolStripMenuItem is pressed down.
/// </summary>
public override Color MenuItemPressedGradientEnd
{
get { return _toolStripEnd; }
}
/// <summary>
/// Gets the middle color of the gradient used when a top-level ToolStripMenuItem is pressed down.
/// </summary>
public override Color MenuItemPressedGradientMiddle
{
get { return _toolStripMiddle; }
}
/// <summary>
/// Gets the starting color of the gradient used when the ToolStripMenuItem is selected.
/// </summary>
public override Color MenuItemSelectedGradientBegin
{
get { return _menuItemSelectedBegin; }
}
/// <summary>
/// Gets the end color of the gradient used when the ToolStripMenuItem is selected.
/// </summary>
public override Color MenuItemSelectedGradientEnd
{
get { return _menuItemSelectedEnd; }
}
#endregion
#region MenuStrip
/// <summary>
/// Gets the starting color of the gradient used in the MenuStrip.
/// </summary>
public override Color MenuStripGradientBegin
{
get { return _menuToolBack; }
}
/// <summary>
/// Gets the end color of the gradient used in the MenuStrip.
/// </summary>
public override Color MenuStripGradientEnd
{
get { return _menuToolBack; }
}
#endregion
#region OverflowButton
/// <summary>
/// Gets the starting color of the gradient used in the ToolStripOverflowButton.
/// </summary>
public override Color OverflowButtonGradientBegin
{
get { return _overflowBegin; }
}
/// <summary>
/// Gets the end color of the gradient used in the ToolStripOverflowButton.
/// </summary>
public override Color OverflowButtonGradientEnd
{
get { return _overflowEnd; }
}
/// <summary>
/// Gets the middle color of the gradient used in the ToolStripOverflowButton.
/// </summary>
public override Color OverflowButtonGradientMiddle
{
get { return _overflowMiddle; }
}
#endregion
#region RaftingContainer
/// <summary>
/// Gets the starting color of the gradient used in the ToolStripContainer.
/// </summary>
public override Color RaftingContainerGradientBegin
{
get { return _menuToolBack; }
}
/// <summary>
/// Gets the end color of the gradient used in the ToolStripContainer.
/// </summary>
public override Color RaftingContainerGradientEnd
{
get { return _menuToolBack; }
}
#endregion
#region Separator
/// <summary>
/// Gets the color to use to for shadow effects on the ToolStripSeparator.
/// </summary>
public override Color SeparatorDark
{
get { return _separatorDark; }
}
/// <summary>
/// Gets the color to use to for highlight effects on the ToolStripSeparator.
/// </summary>
public override Color SeparatorLight
{
get { return _separatorLight; }
}
#endregion
#region StatusStrip
/// <summary>
/// Gets the starting color of the gradient used on the StatusStrip.
/// </summary>
public override Color StatusStripGradientBegin
{
get { return _statusStripLight; }
}
/// <summary>
/// Gets the end color of the gradient used on the StatusStrip.
/// </summary>
public override Color StatusStripGradientEnd
{
get { return _statusStripDark; }
}
#endregion
#region ToolStrip
/// <summary>
/// Gets the border color to use on the bottom edge of the ToolStrip.
/// </summary>
public override Color ToolStripBorder
{
get { return _toolStripBorder; }
}
/// <summary>
/// Gets the starting color of the gradient used in the ToolStripContentPanel.
/// </summary>
public override Color ToolStripContentPanelGradientBegin
{
get { return _toolStripContentEnd; }
}
/// <summary>
/// Gets the end color of the gradient used in the ToolStripContentPanel.
/// </summary>
public override Color ToolStripContentPanelGradientEnd
{
get { return _menuToolBack; }
}
/// <summary>
/// Gets the solid background color of the ToolStripDropDown.
/// </summary>
public override Color ToolStripDropDownBackground
{
get { return _contextMenuBack; }
}
/// <summary>
/// Gets the starting color of the gradient used in the ToolStrip background.
/// </summary>
public override Color ToolStripGradientBegin
{
get { return _toolStripBegin; }
}
/// <summary>
/// Gets the end color of the gradient used in the ToolStrip background.
/// </summary>
public override Color ToolStripGradientEnd
{
get { return _toolStripEnd; }
}
/// <summary>
/// Gets the middle color of the gradient used in the ToolStrip background.
/// </summary>
public override Color ToolStripGradientMiddle
{
get { return _toolStripMiddle; }
}
/// <summary>
/// Gets the starting color of the gradient used in the ToolStripPanel.
/// </summary>
public override Color ToolStripPanelGradientBegin
{
get { return _menuToolBack; }
}
/// <summary>
/// Gets the end color of the gradient used in the ToolStripPanel.
/// </summary>
public override Color ToolStripPanelGradientEnd
{
get { return _menuToolBack; }
}
#endregion
}
}