97 references to FromKnownColor
BinaryFormatTests (1)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
202
Color.
FromKnownColor
(KnownColor.ActiveCaption),
System.Drawing.Primitives (92)
System\Drawing\ColorTranslator.cs (57)
145
return Color.
FromKnownColor
(KnownColor.ActiveBorder);
147
return Color.
FromKnownColor
(KnownColor.ActiveCaption);
149
return Color.
FromKnownColor
(KnownColor.ActiveCaptionText);
151
return Color.
FromKnownColor
(KnownColor.AppWorkspace);
153
return Color.
FromKnownColor
(KnownColor.Control);
155
return Color.
FromKnownColor
(KnownColor.ControlDark);
157
return Color.
FromKnownColor
(KnownColor.ControlDarkDark);
159
return Color.
FromKnownColor
(KnownColor.ControlLight);
161
return Color.
FromKnownColor
(KnownColor.ControlLightLight);
163
return Color.
FromKnownColor
(KnownColor.ControlText);
165
return Color.
FromKnownColor
(KnownColor.Desktop);
167
return Color.
FromKnownColor
(KnownColor.GradientActiveCaption);
169
return Color.
FromKnownColor
(KnownColor.GradientInactiveCaption);
171
return Color.
FromKnownColor
(KnownColor.GrayText);
173
return Color.
FromKnownColor
(KnownColor.Highlight);
175
return Color.
FromKnownColor
(KnownColor.HighlightText);
177
return Color.
FromKnownColor
(KnownColor.HotTrack);
179
return Color.
FromKnownColor
(KnownColor.InactiveBorder);
181
return Color.
FromKnownColor
(KnownColor.InactiveCaption);
183
return Color.
FromKnownColor
(KnownColor.InactiveCaptionText);
185
return Color.
FromKnownColor
(KnownColor.Info);
187
return Color.
FromKnownColor
(KnownColor.InfoText);
189
return Color.
FromKnownColor
(KnownColor.Menu);
191
return Color.
FromKnownColor
(KnownColor.MenuBar);
193
return Color.
FromKnownColor
(KnownColor.MenuHighlight);
195
return Color.
FromKnownColor
(KnownColor.MenuText);
197
return Color.
FromKnownColor
(KnownColor.ScrollBar);
199
return Color.
FromKnownColor
(KnownColor.Window);
201
return Color.
FromKnownColor
(KnownColor.WindowFrame);
203
return Color.
FromKnownColor
(KnownColor.WindowText);
404
["activeborder"] = Color.
FromKnownColor
(KnownColor.ActiveBorder),
405
["activecaption"] = Color.
FromKnownColor
(KnownColor.ActiveCaption),
406
["appworkspace"] = Color.
FromKnownColor
(KnownColor.AppWorkspace),
407
["background"] = Color.
FromKnownColor
(KnownColor.Desktop),
408
["buttonface"] = Color.
FromKnownColor
(KnownColor.Control),
409
["buttonhighlight"] = Color.
FromKnownColor
(KnownColor.ControlLightLight),
410
["buttonshadow"] = Color.
FromKnownColor
(KnownColor.ControlDark),
411
["buttontext"] = Color.
FromKnownColor
(KnownColor.ControlText),
412
["captiontext"] = Color.
FromKnownColor
(KnownColor.ActiveCaptionText),
413
["graytext"] = Color.
FromKnownColor
(KnownColor.GrayText),
414
["highlight"] = Color.
FromKnownColor
(KnownColor.Highlight),
415
["highlighttext"] = Color.
FromKnownColor
(KnownColor.HighlightText),
416
["inactiveborder"] = Color.
FromKnownColor
(KnownColor.InactiveBorder),
417
["inactivecaption"] = Color.
FromKnownColor
(KnownColor.InactiveCaption),
418
["inactivecaptiontext"] = Color.
FromKnownColor
(KnownColor.InactiveCaptionText),
419
["infobackground"] = Color.
FromKnownColor
(KnownColor.Info),
420
["infotext"] = Color.
FromKnownColor
(KnownColor.InfoText),
421
["menu"] = Color.
FromKnownColor
(KnownColor.Menu),
422
["menutext"] = Color.
FromKnownColor
(KnownColor.MenuText),
423
["scrollbar"] = Color.
FromKnownColor
(KnownColor.ScrollBar),
424
["threeddarkshadow"] = Color.
FromKnownColor
(KnownColor.ControlDarkDark),
425
["threedface"] = Color.
FromKnownColor
(KnownColor.Control),
426
["threedhighlight"] = Color.
FromKnownColor
(KnownColor.ControlLight),
427
["threedlightshadow"] = Color.
FromKnownColor
(KnownColor.ControlLightLight),
428
["window"] = Color.
FromKnownColor
(KnownColor.Window),
429
["windowframe"] = Color.
FromKnownColor
(KnownColor.WindowFrame),
430
["windowtext"] = Color.
FromKnownColor
(KnownColor.WindowText)
System\Drawing\KnownColorTable.cs (1)
485
return Color.
FromKnownColor
((KnownColor)index);
System\Drawing\SystemColors.cs (34)
12
public static Color ActiveBorder => Color.
FromKnownColor
(KnownColor.ActiveBorder);
13
public static Color ActiveCaption => Color.
FromKnownColor
(KnownColor.ActiveCaption);
14
public static Color ActiveCaptionText => Color.
FromKnownColor
(KnownColor.ActiveCaptionText);
15
public static Color AppWorkspace => Color.
FromKnownColor
(KnownColor.AppWorkspace);
17
public static Color ButtonFace => Color.
FromKnownColor
(KnownColor.ButtonFace);
18
public static Color ButtonHighlight => Color.
FromKnownColor
(KnownColor.ButtonHighlight);
19
public static Color ButtonShadow => Color.
FromKnownColor
(KnownColor.ButtonShadow);
21
public static Color Control => Color.
FromKnownColor
(KnownColor.Control);
22
public static Color ControlDark => Color.
FromKnownColor
(KnownColor.ControlDark);
23
public static Color ControlDarkDark => Color.
FromKnownColor
(KnownColor.ControlDarkDark);
24
public static Color ControlLight => Color.
FromKnownColor
(KnownColor.ControlLight);
25
public static Color ControlLightLight => Color.
FromKnownColor
(KnownColor.ControlLightLight);
26
public static Color ControlText => Color.
FromKnownColor
(KnownColor.ControlText);
28
public static Color Desktop => Color.
FromKnownColor
(KnownColor.Desktop);
30
public static Color GradientActiveCaption => Color.
FromKnownColor
(KnownColor.GradientActiveCaption);
31
public static Color GradientInactiveCaption => Color.
FromKnownColor
(KnownColor.GradientInactiveCaption);
32
public static Color GrayText => Color.
FromKnownColor
(KnownColor.GrayText);
34
public static Color Highlight => Color.
FromKnownColor
(KnownColor.Highlight);
35
public static Color HighlightText => Color.
FromKnownColor
(KnownColor.HighlightText);
36
public static Color HotTrack => Color.
FromKnownColor
(KnownColor.HotTrack);
38
public static Color InactiveBorder => Color.
FromKnownColor
(KnownColor.InactiveBorder);
39
public static Color InactiveCaption => Color.
FromKnownColor
(KnownColor.InactiveCaption);
40
public static Color InactiveCaptionText => Color.
FromKnownColor
(KnownColor.InactiveCaptionText);
41
public static Color Info => Color.
FromKnownColor
(KnownColor.Info);
42
public static Color InfoText => Color.
FromKnownColor
(KnownColor.InfoText);
44
public static Color Menu => Color.
FromKnownColor
(KnownColor.Menu);
45
public static Color MenuBar => Color.
FromKnownColor
(KnownColor.MenuBar);
46
public static Color MenuHighlight => Color.
FromKnownColor
(KnownColor.MenuHighlight);
47
public static Color MenuText => Color.
FromKnownColor
(KnownColor.MenuText);
49
public static Color ScrollBar => Color.
FromKnownColor
(KnownColor.ScrollBar);
51
public static Color Window => Color.
FromKnownColor
(KnownColor.Window);
52
public static Color WindowFrame => Color.
FromKnownColor
(KnownColor.WindowFrame);
53
public static Color WindowText => Color.
FromKnownColor
(KnownColor.WindowText);
58
/// <see cref="Color.
FromKnownColor
(KnownColor)"/>). This is currently "dark mode"
System.Private.Windows.Core (1)
System\Value.PackedColor.cs (1)
53
? Color.
FromKnownColor
((KnownColor)_knownColor)
System.Windows.Forms (1)
System\Windows\Forms\Rendering\ControlPaint.cs (1)
401
DrawBorder(graphics, bounds, Color.
FromKnownColor
(KnownColor.WindowFrame), ButtonBorderStyle.Solid);
System.Windows.Forms.Tests (2)
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (2)
57
result.Should().Be(Color.
FromKnownColor
(expectedColor));
71
result.Should().Be(Color.
FromKnownColor
(expectedColor));