183 references to Empty
Microsoft.Private.Windows.Core (1)
System\Value.PackedColor.cs (1)
53
: _state == 0 ? Color.
Empty
: Color.FromArgb(_argb);
System.ComponentModel.TypeConverter (2)
src\runtime\src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (1)
20
return Color.
Empty
;
System\Drawing\ColorConverter.cs (1)
56
if (c == Color.
Empty
)
System.Drawing.Common (5)
System\Drawing\Imaging\ImageAttributes.cs (2)
249
public void ClearColorKey(ColorAdjustType type) => SetColorKey(Color.
Empty
, Color.
Empty
, type, enableFlag: false);
System\Drawing\Pen.cs (1)
550
if (_color == Color.
Empty
)
System\Drawing\SolidBrush.cs (2)
11
private Color _color = Color.
Empty
;
64
if (_color == Color.
Empty
)
System.Drawing.Primitives (2)
src\runtime\src\libraries\Common\src\System\Drawing\ColorConverterCommon.cs (1)
20
return Color.
Empty
;
System\Drawing\ColorTranslator.cs (1)
224
Color c = Color.
Empty
;
System.Private.Windows.Core (1)
System\Value.PackedColor.cs (1)
53
: _state == 0 ? Color.
Empty
: Color.FromArgb(_argb);
System.Private.Windows.Core.TestUtilities (1)
CommonTestHelper.cs (1)
71
Color.
Empty
System.Windows.Forms (159)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
190
return property.Value is null ? Color.
Empty
: (Color)property.Value;
251
return property.Value is null ? Color.
Empty
: (Color)property.Value;
System\Windows\Forms\Control.cs (5)
904
if (!value.Equals(Color.
Empty
) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255)
3037
Color oldBackColor = Color.
Empty
;
3038
Color oldForeColor = Color.
Empty
;
9145
BackColor = Color.
Empty
;
9174
ForeColor = Color.
Empty
;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
159
if (value != Color.
Empty
)
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (4)
15
private Color _borderColor = Color.
Empty
;
16
private Color _checkedBackColor = Color.
Empty
;
17
private Color _mouseDownBackColor = Color.
Empty
;
18
private Color _mouseOverBackColor = Color.
Empty
;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (8)
1978
else if (_defaultCellStyle.BackColor == Color.
Empty
1979
|| _defaultCellStyle.ForeColor == Color.
Empty
1980
|| _defaultCellStyle.SelectionBackColor == Color.
Empty
1981
|| _defaultCellStyle.SelectionForeColor == Color.
Empty
1990
if (_defaultCellStyle.BackColor == Color.
Empty
)
1995
if (_defaultCellStyle.ForeColor == Color.
Empty
)
2001
if (_defaultCellStyle.SelectionBackColor == Color.
Empty
)
2006
if (_defaultCellStyle.SelectionForeColor == Color.
Empty
)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
887
ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.
Empty
, cellStyle.ForeColor);
950
Color.
Empty
,
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1882
inheritedCellStyleTmp.BackColor = Color.
Empty
;
1883
inheritedCellStyleTmp.ForeColor = Color.
Empty
;
1884
inheritedCellStyleTmp.SelectionBackColor = Color.
Empty
;
1885
inheritedCellStyleTmp.SelectionForeColor = Color.
Empty
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (5)
160
get => Properties.TryGetValue(s_propForeColor, out Color color) ? color : Color.
Empty
;
538
if (BackColor != Color.
Empty
)
544
if (ForeColor != Color.
Empty
)
555
if (SelectionBackColor != Color.
Empty
)
566
if (SelectionForeColor != Color.
Empty
)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (3)
2263
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, cellStyle.ForeColor);
2274
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, cellStyle.ForeColor);
2279
ControlPaint.DrawFocusRectangle(g, textBounds, Color.
Empty
, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
897
ControlPaint.DrawFocusRectangle(g, valBounds, Color.
Empty
, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
1000
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, brushColor);
1053
ControlPaint.DrawFocusRectangle(g, errorBounds, Color.
Empty
, brushColor);
1068
ControlPaint.DrawFocusRectangle(g, valBounds, Color.
Empty
, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1201
ControlPaint.DrawFocusRectangle(graphics, bounds, Color.
Empty
, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
713
ControlPaint.DrawFocusRectangle(graphics, valBounds, Color.
Empty
, cellStyle.ForeColor);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (11)
23
private static Color s_iedisabledLinkColor = Color.
Empty
;
29
private Color _linkColor = Color.
Empty
;
30
private Color _activeLinkColor = Color.
Empty
;
31
private Color _visitedLinkColor = Color.
Empty
;
32
private Color _disabledLinkColor = Color.
Empty
;
1254
Color brushColor = Color.
Empty
;
1283
if (brushColor == Color.
Empty
)
1526
internal void ResetActiveLinkColor() => _activeLinkColor = Color.
Empty
;
1528
internal void ResetDisabledLinkColor() => _disabledLinkColor = Color.
Empty
;
1532
_linkColor = Color.
Empty
;
1536
private void ResetVisitedLinkColor() => _visitedLinkColor = Color.
Empty
;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (3)
13
private static Color s_ielinkColor = Color.
Empty
;
14
private static Color s_ieactiveLinkColor = Color.
Empty
;
15
private static Color s_ievisitedLinkColor = Color.
Empty
;
System\Windows\Forms\Controls\ListView\ListView.cs (4)
2794
Color subItemForeColor = Color.
Empty
;
2795
Color subItemBackColor = Color.
Empty
;
2825
Color riFore = Color.
Empty
;
2826
Color riBack = Color.
Empty
;
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (1)
16
private Color _color = Color.
Empty
;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (2)
75
if (style is not null && style.backColor != Color.
Empty
)
168
if (style is not null && style.foreColor != Color.
Empty
)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.SubItemStyle.cs (2)
15
public Color backColor = Color.
Empty
; // Do NOT rename (binary serialization).
17
public Color foreColor = Color.
Empty
; // Do NOT rename (binary serialization).
System\Windows\Forms\Controls\ListView\ListViewItemConverter.cs (4)
97
item.SubItems[0].CustomForeColor ? item.ForeColor : Color.
Empty
,
98
item.SubItems[0].CustomBackColor ? item.BackColor : Color.
Empty
,
117
item.SubItems[0].CustomForeColor ? item.ForeColor : Color.
Empty
,
118
item.SubItems[0].CustomBackColor ? item.BackColor : Color.
Empty
,
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
3692
=> _commandsPane.SetColors(SystemColors.Control, SystemColors.ControlText, Color.
Empty
, Color.
Empty
, Color.
Empty
, Color.
Empty
);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (5)
836
/// <returns>The color or <see cref="Color.
Empty
"/> if the selection has more than one color.</returns>
844
Color selColor = Color.
Empty
;
880
Color selColor = Color.
Empty
;
914
if (value == Color.
Empty
)
2436
if (_selectionBackColorToSetOnHandleCreated != Color.
Empty
)
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
119
if (value != Color.
Empty
)
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1)
375
Color empty = Color.
Empty
;
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (1)
10
private Color _arrowColor = Color.
Empty
;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (9)
43
private Color _imageTransparentColor = Color.
Empty
;
531
Properties.AddOrRemoveValue(s_backColorProperty, value, defaultValue: Color.
Empty
);
1057
if (value is Bitmap bmp && ImageTransparentColor != Color.
Empty
)
1094
if (Image is Bitmap currentImage && value != Color.
Empty
)
1614
internal Color RawBackColor => Properties.GetValueOrDefault(s_backColorProperty, Color.
Empty
);
3279
private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor != Color.
Empty
;
3369
public virtual void ResetBackColor() => BackColor = Color.
Empty
;
3378
public virtual void ResetForeColor() => ForeColor = Color.
Empty
;
3393
private void ResetImageTransparentColor() => ImageTransparentColor = Color.
Empty
;
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (3)
20
private Color _linkColor = Color.
Empty
;
21
private Color _activeLinkColor = Color.
Empty
;
22
private Color _visitedLinkColor = Color.
Empty
;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1158
control.RawBackColor == Color.
Empty
&& control.BackgroundImage is null;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (3)
16
: this(g, toolStrip, new Rectangle(Point.Empty, toolStrip.OrThrowIfNull().Size), Color.
Empty
)
57
if (_backColor != Color.
Empty
)
70
if (_backColor != Color.
Empty
)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (1)
259
if (e.Item.BackColor != Color.Transparent && e.Item.BackColor != Color.
Empty
)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (2)
483
else if (item.RawBackColor != Color.
Empty
)
528
else if (!ToolStripManager.VisualStylesEnabled && (item.RawBackColor != Color.
Empty
))
System\Windows\Forms\Controls\TreeView\TreeNode.cs (6)
183
return Color.
Empty
;
198
_propBag.BackColor = Color.
Empty
;
410
return Color.
Empty
;
424
_propBag.ForeColor = Color.
Empty
;
2037
return BackColor != Color.
Empty
;
2042
return ForeColor != Color.
Empty
;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
1896
if (_lineColor != Color.
Empty
)
2828
Color color = (((curState & TreeNodeStates.Selected) == TreeNodeStates.Selected) && node.TreeView.Focused) ? SystemColors.HighlightText : (node.ForeColor != Color.
Empty
) ? node.ForeColor : node.TreeView.ForeColor;
System\Windows\Forms\Controls\WebBrowser\HtmlDocument.cs (6)
182
return Color.
Empty
;
207
return Color.
Empty
;
232
return Color.
Empty
;
257
return Color.
Empty
;
282
return Color.
Empty
;
674
return Color.
Empty
;
System\Windows\Forms\Form.cs (16)
373
Properties.AddValue(s_propTransparencyKey, Color.
Empty
);
1589
_formState[s_formStateLayered] = (TransparencyKey != Color.
Empty
) ? 1 : 0;
2083
get => Properties.GetValueOrDefault(s_propTransparencyKey, Color.
Empty
);
2086
Properties.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.
Empty
);
2090
if (value != Color.
Empty
)
2330
/// The <see cref="Color"/> which has be previously set using this property or <see cref="Color.
Empty
"/>.
2353
get => Properties.GetValueOrDefault(s_propFormBorderColor, Color.
Empty
);
2361
Properties.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.
Empty
);
2390
/// The <see cref="Color"/>, which has be previously set using this property or <see cref="Color.
Empty
"/>.
2413
get => Properties.GetValueOrDefault(s_propFormCaptionBackColor, Color.
Empty
);
2421
Properties.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.
Empty
);
2451
/// The <see cref="Color"/>, which has be previously set using this property or <see cref="Color.
Empty
"/>.
2474
get => Properties.GetValueOrDefault(s_propFormCaptionTextColor, Color.
Empty
);
2482
Properties.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.
Empty
);
5030
private void ResetTransparencyKey() => TransparencyKey = Color.
Empty
;
5993
return !TransparencyKey.Equals(Color.
Empty
);
System\Windows\Forms\Rendering\ControlPaint.cs (18)
1224
Color.
Empty
,
1225
Color.
Empty
);
1253
Color.
Empty
,
1254
Color.
Empty
);
1279
Color.
Empty
,
1280
Color.
Empty
);
1299
Color.
Empty
,
1300
Color.
Empty
);
1479
if (foreColor == Color.
Empty
|| backColor == Color.
Empty
)
1749
=> DrawFrameControl(graphics, x, y, width, height, DFC_TYPE.DFC_MENU, (DFCS_STATE)glyph, Color.
Empty
, Color.
Empty
);
1781
Color.
Empty
,
1782
Color.
Empty
);
1801
Color.
Empty
,
1802
Color.
Empty
);
1918
Color.
Empty
,
1919
Color.
Empty
);
System\Windows\Forms\Rendering\ControlPaint_ModernControlButtonRenderer.cs (1)
130
DrawFocusRectangle(graphics, focusRect, Color.
Empty
, backgroundColor);
System\Windows\Forms\Rendering\TextExtensions.cs (2)
47
/// <param name="backColor">If <see cref="Color.
Empty
"/>, the hdc current background color is used.</param>
48
/// <param name="foreColor">If <see cref="Color.
Empty
"/>, the hdc current foreground color is used.</param>
System\Windows\Forms\Rendering\TextRenderer.cs (10)
26
=> DrawTextInternal(dc, text, font, pt, foreColor, Color.
Empty
);
38
=> DrawTextInternal(dc, text, font, pt, foreColor, Color.
Empty
);
75
=> DrawTextInternal(dc, text, font, pt, foreColor, Color.
Empty
, flags);
104
Color.
Empty
,
150
=> DrawTextInternal(dc, text, font, bounds, foreColor, Color.
Empty
);
167
=> DrawTextInternal(dc, text, font, bounds, foreColor, Color.
Empty
);
205
=> DrawTextInternal(dc, text, font, bounds, foreColor, Color.
Empty
, flags);
234
Color.
Empty
,
319
=> DrawTextInternal(e, text, font, bounds, foreColor, Color.
Empty
, flags);
353
=> DrawTextInternal(hdc, text, font, bounds, foreColor, fontQuality, Color.
Empty
, flags);
System.Windows.Forms.Design (9)
System\Drawing\Design\ColorEditor.cs (1)
31
if (_colorUI.Value is Color colorValue && colorValue != Color.
Empty
)
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (1)
114
Color = Color.
Empty
;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
931
Color backColor = primaryParent is not null ? primaryParent.BackColor : Color.
Empty
;
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (1)
632
Color backColor = targetControl.Parent is not null ? targetControl.Parent.BackColor : Color.
Empty
;
System\Windows\Forms\Design\DesignerUtils.cs (3)
191
if (backColor != Color.
Empty
&& backColor.GetBrightness() < .5)
215
if (backColor != Color.
Empty
&& backColor.GetBrightness() < .5)
229
if (backColor != Color.
Empty
&& backColor.GetBrightness() < .5)
System\Windows\Forms\Design\DocumentDesigner.cs (1)
1269
BackColor = Color.
Empty
;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
441
if (backColor != Color.
Empty
&& backColor.GetBrightness() < .5)
WindowsFormsIntegration (3)
System\Windows\Integration\ElementHost.cs (2)
1536
if (control.BackColor != SD.Color.
Empty
&& control.BackColor.A == 255)
1541
return SD.Color.
Empty
;
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
373
SD.Color wfColor = SD.Color.
Empty
;