733 references to Empty
BinaryFormatTests (1)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
200
Color.
Empty
,
System.ComponentModel.TypeConverter (2)
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.Tests (43)
mono\System.Drawing\GraphicsTests.cs (1)
63
int empty = Color.
Empty
.ToArgb();
System\Drawing\ColorTranslatorTests.cs (4)
143
yield return new object[] { null, Color.
Empty
};
144
yield return new object[] { "", Color.
Empty
};
145
yield return new object[] { " ", Color.
Empty
};
237
yield return new object[] { Color.
Empty
, "" };
System\Drawing\Drawing2D\HatchBrushTests.cs (3)
52
AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.
Empty
));
53
AssertExtensions.Throws<ArgumentException>("hatchstyle", null, () => new HatchBrush(hatchStyle, Color.
Empty
, Color.
Empty
));
System\Drawing\Drawing2D\LinearGradientBrushTests.cs (33)
10
yield return new object[] { new Point(0, 0), new Point(2, 2), Color.
Empty
, Color.
Empty
, new RectangleF(0, 0, 2, 2) };
11
yield return new object[] { new Point(1, 0), new Point(0, 0), Color.
Empty
, Color.Red, new RectangleF(0, -0.5f, 1, 1) };
75
yield return new object[] { new Rectangle(0, 0, 1, 2), Color.
Empty
, Color.Red, LinearGradientMode.BackwardDiagonal };
117
yield return new object[] { new Rectangle(0, 0, 1, 2), Color.
Empty
, Color.Red, 90 };
204
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.
Empty
, Color.
Empty
, 0f));
205
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.
Empty
, Color.
Empty
, 0f));
206
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.
Empty
, Color.
Empty
, LinearGradientMode.BackwardDiagonal));
207
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.
Empty
, Color.
Empty
, LinearGradientMode.BackwardDiagonal));
208
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 0, 4), Color.
Empty
, Color.
Empty
, 0, true));
209
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 0, 4), Color.
Empty
, Color.
Empty
, 0, true));
215
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.
Empty
, Color.
Empty
, 0f));
216
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.
Empty
, Color.
Empty
, 0f));
217
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.
Empty
, Color.
Empty
, LinearGradientMode.BackwardDiagonal));
218
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.
Empty
, Color.
Empty
, LinearGradientMode.BackwardDiagonal));
219
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new Rectangle(1, 2, 3, 0), Color.
Empty
, Color.
Empty
, 0, true));
220
AssertExtensions.Throws<ArgumentException>(null, () => new LinearGradientBrush(new RectangleF(1, 2, 3, 0), Color.
Empty
, Color.
Empty
, 0, true));
228
Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new Rectangle(1, 2, 3, 4), Color.
Empty
, Color.
Empty
, linearGradientMode));
229
Assert.ThrowsAny<ArgumentException>(() => new LinearGradientBrush(new RectangleF(1, 2, 3, 4), Color.
Empty
, Color.
Empty
, linearGradientMode));
System\Drawing\Drawing2D\PathGradientBrushTests.cs (2)
546
Color[] defaultColors = [Color.
Empty
];
946
Assert.Equal(new Color[] { Color.
Empty
}, brush.InterpolationColors.Colors);
System.Drawing.Primitives (2)
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)
54
: _state == 0 ? Color.
Empty
: Color.FromArgb(_argb);
System.Private.Windows.Core.TestUtilities (1)
CommonTestHelper.cs (1)
71
Color.
Empty
System.Windows.Forms (157)
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)
809
if (!value.Equals(Color.
Empty
) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255)
2949
Color oldBackColor = Color.
Empty
;
2950
Color oldForeColor = Color.
Empty
;
9032
BackColor = Color.
Empty
;
9061
ForeColor = Color.
Empty
;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
161
if (value != Color.
Empty
)
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (4)
16
private Color _borderColor = Color.
Empty
;
17
private Color _checkedBackColor = Color.
Empty
;
18
private Color _mouseDownBackColor = Color.
Empty
;
19
private Color _mouseOverBackColor = Color.
Empty
;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (8)
1971
else if (_defaultCellStyle.BackColor == Color.
Empty
1972
|| _defaultCellStyle.ForeColor == Color.
Empty
1973
|| _defaultCellStyle.SelectionBackColor == Color.
Empty
1974
|| _defaultCellStyle.SelectionForeColor == Color.
Empty
1983
if (_defaultCellStyle.BackColor == Color.
Empty
)
1988
if (_defaultCellStyle.ForeColor == Color.
Empty
)
1994
if (_defaultCellStyle.SelectionBackColor == Color.
Empty
)
1999
if (_defaultCellStyle.SelectionForeColor == Color.
Empty
)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (2)
890
ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.
Empty
, cellStyle.ForeColor);
953
Color.
Empty
,
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1893
inheritedCellStyleTmp.BackColor = Color.
Empty
;
1894
inheritedCellStyleTmp.ForeColor = Color.
Empty
;
1895
inheritedCellStyleTmp.SelectionBackColor = Color.
Empty
;
1896
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)
2270
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, cellStyle.ForeColor);
2281
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, cellStyle.ForeColor);
2286
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)
1003
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, brushColor);
1044
ControlPaint.DrawFocusRectangle(g, errorBounds, Color.
Empty
, brushColor);
1059
ControlPaint.DrawFocusRectangle(g, valBounds, Color.
Empty
, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1197
ControlPaint.DrawFocusRectangle(graphics, bounds, Color.
Empty
, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
711
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
;
1256
Color brushColor = Color.
Empty
;
1285
if (brushColor == Color.
Empty
)
1528
internal void ResetActiveLinkColor() => _activeLinkColor = Color.
Empty
;
1530
internal void ResetDisabledLinkColor() => _disabledLinkColor = Color.
Empty
;
1534
_linkColor = Color.
Empty
;
1538
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)
2780
Color subItemForeColor = Color.
Empty
;
2781
Color subItemBackColor = Color.
Empty
;
2811
Color riFore = Color.
Empty
;
2812
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)
3700
=> _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
)
2445
if (_selectionBackColorToSetOnHandleCreated != Color.
Empty
)
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
123
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
;
526
Properties.AddOrRemoveValue(s_backColorProperty, value, defaultValue: Color.
Empty
);
1052
if (value is Bitmap bmp && ImageTransparentColor != Color.
Empty
)
1089
if (Image is Bitmap currentImage && value != Color.
Empty
)
1617
internal Color RawBackColor => Properties.GetValueOrDefault<Color>(s_backColorProperty, Color.
Empty
);
3286
private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor != Color.
Empty
;
3376
public virtual void ResetBackColor() => BackColor = Color.
Empty
;
3385
public virtual void ResetForeColor() => ForeColor = Color.
Empty
;
3400
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)
1023
return (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\ToolStripSystemRenderer.cs (2)
430
else if (item.RawBackColor != Color.
Empty
)
475
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
;
2040
return BackColor != Color.
Empty
;
2045
return ForeColor != Color.
Empty
;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
1899
if (_lineColor != Color.
Empty
)
2841
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)
183
return Color.
Empty
;
208
return Color.
Empty
;
233
return Color.
Empty
;
258
return Color.
Empty
;
283
return Color.
Empty
;
675
return Color.
Empty
;
System\Windows\Forms\Form.cs (16)
377
Properties.AddValue(s_propTransparencyKey, Color.
Empty
);
1596
_formState[s_formStateLayered] = (TransparencyKey != Color.
Empty
) ? 1 : 0;
2006
get => Properties.GetValueOrDefault(s_propTransparencyKey, Color.
Empty
);
2009
Properties.AddOrRemoveValue(s_propTransparencyKey, value, defaultValue: Color.
Empty
);
2013
if (value != Color.
Empty
)
2257
/// The <see cref="Color"/> which has be previously set using this property or <see cref="Color.
Empty
"/>.
2281
get => Properties.GetValueOrDefault(s_propFormBorderColor, Color.
Empty
);
2289
Properties.AddOrRemoveValue(s_propFormBorderColor, value, defaultValue: Color.
Empty
);
2319
/// The <see cref="Color"/>, which has be previously set using this property or <see cref="Color.
Empty
"/>.
2343
get => Properties.GetValueOrDefault(s_propFormCaptionBackColor, Color.
Empty
);
2351
Properties.AddOrRemoveValue(s_propFormCaptionBackColor, value, defaultValue: Color.
Empty
);
2382
/// The <see cref="Color"/>, which has be previously set using this property or <see cref="Color.
Empty
"/>.
2406
get => Properties.GetValueOrDefault(s_propFormCaptionTextColor, Color.
Empty
);
2414
Properties.AddOrRemoveValue(s_propFormCaptionTextColor, value, defaultValue: Color.
Empty
);
4956
private void ResetTransparencyKey() => TransparencyKey = Color.
Empty
;
5894
return !TransparencyKey.Equals(Color.
Empty
);
System\Windows\Forms\Rendering\ControlPaint.cs (18)
1192
Color.
Empty
,
1193
Color.
Empty
);
1221
Color.
Empty
,
1222
Color.
Empty
);
1247
Color.
Empty
,
1248
Color.
Empty
);
1267
Color.
Empty
,
1268
Color.
Empty
);
1451
if (foreColor == Color.
Empty
|| backColor == Color.
Empty
)
1724
=> DrawFrameControl(graphics, x, y, width, height, DFC_TYPE.DFC_MENU, (DFCS_STATE)glyph, Color.
Empty
, Color.
Empty
);
1756
Color.
Empty
,
1757
Color.
Empty
);
1776
Color.
Empty
,
1777
Color.
Empty
);
1860
Color.
Empty
,
1861
Color.
Empty
);
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)
937
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)
1326
BackColor = Color.
Empty
;
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
441
if (backColor != Color.
Empty
&& backColor.GetBrightness() < .5)
System.Windows.Forms.Design.Tests (1)
System\Drawing\Design\ColorEditorTests.cs (1)
24
yield return new object[] { Color.
Empty
};
System.Windows.Forms.Tests (511)
System\Windows\Forms\AmbientPropertiesTests.cs (2)
16
Assert.Equal(Color.
Empty
, property.BackColor);
19
Assert.Equal(Color.
Empty
, property.ForeColor);
System\Windows\Forms\ButtonBaseTests.cs (6)
695
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 1 };
751
control.BackColor = Color.
Empty
;
1032
Assert.Equal(Color.
Empty
, appearance.BorderColor);
1034
Assert.Equal(Color.
Empty
, appearance.CheckedBackColor);
1035
Assert.Equal(Color.
Empty
, appearance.MouseDownBackColor);
1036
Assert.Equal(Color.
Empty
, appearance.MouseOverBackColor);
System\Windows\Forms\ColorDialogTests.cs (2)
42
Assert.Equal(Color.
Empty
, dialog.Color);
107
yield return new object[] { Color.
Empty
, Color.Black };
System\Windows\Forms\ComboBoxTests.cs (6)
165
yield return new object[] { Color.
Empty
, SystemColors.Window };
188
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
265
control.BackColor = Color.
Empty
;
1047
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1073
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1133
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ControlPaintTests.cs (23)
13
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed), Color.
Empty
};
14
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), Color.
Empty
};
15
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), Color.
Empty
};
542
yield return new object[] { Rectangle.Empty, Color.
Empty
, style };
543
yield return new object[] { new Rectangle(1, 2, -3, -4), Color.
Empty
, style };
551
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
, style };
1193
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
, Color.Blue };
1197
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.
Empty
};
1269
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.
Empty
};
1314
yield return new object[] { new Bitmap(10, 10), 0, 0, Color.
Empty
};
1322
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.
Empty
};
1416
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.
Empty
, Color.Blue };
1420
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.
Empty
};
1680
yield return new object[] { Rectangle.Empty, Color.
Empty
, style };
1681
yield return new object[] { new Rectangle(1, 2, -3, -4), Color.
Empty
, style };
1689
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
, style };
1710
yield return new object[] { new Point(1, 2), new Point(2, 3), Color.
Empty
};
1718
yield return new object[] { new Point(1, 2), new Point(2, 3), Color.
Empty
};
1826
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.
Empty
};
1858
yield return new object[] { Color.
Empty
, new Rectangle(1, 2, 3, 4) };
1907
yield return new object[] { s, SystemFonts.MenuFont, Color.
Empty
, new RectangleF(1, 2, 3, 4), new StringFormat() };
1955
yield return new object[] { s, SystemFonts.MenuFont, Color.
Empty
, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
2016
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
};
System\Windows\Forms\ControlTests.Handlers.cs (34)
2768
yield return new object[] { true, Color.
Empty
, null };
2769
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty) };
2770
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2771
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2781
yield return new object[] { false, Color.
Empty
, null };
2782
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty) };
2783
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2784
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2873
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty), 0 };
2874
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2875
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2883
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty), 0 };
2884
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2885
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
3840
yield return new object[] { true, Color.
Empty
, backgroundImage, backgroundImageLayout };
3844
yield return new object[] { false, Color.
Empty
, backgroundImage, backgroundImageLayout };
3903
yield return new object[] { parent, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3907
yield return new object[] { parent, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3912
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3916
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3919
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3923
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3947
yield return new object[] { parent, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3949
yield return new object[] { parent, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3956
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3958
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3963
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3965
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
4075
yield return new object[] { true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4079
yield return new object[] { false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4084
yield return new object[] { true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4088
yield return new object[] { false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4091
yield return new object[] { true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4095
yield return new object[] { false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\ControlTests.Methods.cs (14)
4559
yield return new object[] { true, Color.
Empty
, null };
4560
yield return new object[] { true, Color.
Empty
, Rectangle.Empty };
4561
yield return new object[] { true, Color.
Empty
, new Rectangle(100, 200, 300, 400) };
4562
yield return new object[] { true, Color.
Empty
, new Rectangle(1, 2, 300, 400) };
4572
yield return new object[] { false, Color.
Empty
, null };
4573
yield return new object[] { false, Color.
Empty
, Rectangle.Empty };
4574
yield return new object[] { false, Color.
Empty
, new Rectangle(100, 200, 300, 400) };
4575
yield return new object[] { false, Color.
Empty
, new Rectangle(1, 2, 300, 400) };
4664
yield return new object[] { true, Color.
Empty
, Rectangle.Empty, 0 };
4665
yield return new object[] { true, Color.
Empty
, new Rectangle(100, 200, 300, 400), 0 };
4666
yield return new object[] { true, Color.
Empty
, new Rectangle(1, 2, 300, 400), 0 };
4674
yield return new object[] { false, Color.
Empty
, Rectangle.Empty, 0 };
4675
yield return new object[] { false, Color.
Empty
, new Rectangle(100, 200, 300, 400), 0 };
4676
yield return new object[] { false, Color.
Empty
, new Rectangle(1, 2, 300, 400), 0 };
System\Windows\Forms\ControlTests.Properties.cs (9)
1265
yield return new object[] { Color.
Empty
, Control.DefaultBackColor };
1342
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
1398
control.BackColor = Color.
Empty
;
1493
control.BackColor = Color.
Empty
;
1573
control.BackColor = Color.
Empty
;
5383
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
5439
control.ForeColor = Color.
Empty
;
5534
control.ForeColor = Color.
Empty
;
5614
control.ForeColor = Color.
Empty
;
System\Windows\Forms\DataGridViewCellStyleTests.cs (24)
19
Assert.Equal(Color.
Empty
, style.BackColor);
22
Assert.Equal(Color.
Empty
, style.ForeColor);
30
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
31
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
86
Assert.Equal(Color.
Empty
, style.BackColor);
89
Assert.Equal(Color.
Empty
, style.ForeColor);
97
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
98
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
154
style.BackColor = Color.
Empty
;
155
Assert.Equal(Color.
Empty
, style.BackColor);
312
style.ForeColor = Color.
Empty
;
313
Assert.Equal(Color.
Empty
, style.ForeColor);
530
style.SelectionBackColor = Color.
Empty
;
531
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
556
style.SelectionForeColor = Color.
Empty
;
557
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
755
Assert.Equal(Color.
Empty
, style.BackColor);
758
Assert.Equal(Color.
Empty
, style.ForeColor);
766
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
767
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
822
Assert.Equal(Color.
Empty
, style.BackColor);
825
Assert.Equal(Color.
Empty
, style.ForeColor);
833
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
834
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
System\Windows\Forms\DataGridViewTests.cs (4)
793
yield return new object[] { new DataGridViewCellStyle { BackColor = Color.
Empty
} };
794
yield return new object[] { new DataGridViewCellStyle { ForeColor = Color.
Empty
} };
795
yield return new object[] { new DataGridViewCellStyle { SelectionBackColor = Color.
Empty
} };
796
yield return new object[] { new DataGridViewCellStyle { SelectionForeColor = Color.
Empty
} };
System\Windows\Forms\DataGridViewTests.Rendering.cs (3)
56
State.Pen(1, Color.
Empty
, PEN_STYLE.PS_NULL),
87
State.Pen(1, Color.
Empty
, PEN_STYLE.PS_NULL),
95
State.Brush(Color.
Empty
, BRUSH_STYLE.BS_NULL),
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
156
Assert.Equal(Color.
Empty
, control.TransparencyKey);
System\Windows\Forms\DrawItemEventArgsTests.cs (2)
38
yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1, Color.
Empty
, Color.
Empty
};
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (4)
13
yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(ListViewItemStates.Checked - 1), Color.
Empty
, Color.
Empty
, null };
105
yield return new object[] { new Rectangle(-1, -2, -3, -4), 0, ListViewItemStates.Default, Color.
Empty
, Color.
Empty
, null };
System\Windows\Forms\DrawToolTipEventArgsTests.cs (8)
13
yield return new object[] { null, null, Rectangle.Empty, null, Color.
Empty
, Color.
Empty
, null };
35
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), null, Color.
Empty
, Color.
Empty
, null };
36
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), string.Empty, Color.
Empty
, Color.
Empty
, null };
37
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), "tooltipText", Color.
Empty
, Color.
Empty
, null };
System\Windows\Forms\FontDialogTests.cs (2)
50
Assert.Equal(Color.
Empty
, dialog.Color);
164
yield return new object[] { Color.
Empty
, Color.Black };
System\Windows\Forms\FormTests.cs (55)
158
Assert.Equal(Color.
Empty
, control.TransparencyKey);
315
Assert.Equal(Color.
Empty
, control.TransparencyKey);
322
Assert.Equal(Color.
Empty
, control.TransparencyKey);
329
Assert.Equal(Color.
Empty
, control.TransparencyKey);
337
yield return new object[] { false, Color.
Empty
, 1 };
365
Assert.Equal(Color.
Empty
, control.TransparencyKey);
380
Assert.Equal(Color.
Empty
, control.TransparencyKey);
387
Assert.Equal(Color.
Empty
, control.TransparencyKey);
394
Assert.Equal(Color.
Empty
, control.TransparencyKey);
415
Assert.Equal(Color.
Empty
, control.TransparencyKey);
425
Assert.Equal(Color.
Empty
, control.TransparencyKey);
435
Assert.Equal(Color.
Empty
, control.TransparencyKey);
446
yield return new object[] { false, Color.
Empty
, 1, 1 };
488
Assert.Equal(Color.
Empty
, control.TransparencyKey);
515
Assert.Equal(Color.
Empty
, control.TransparencyKey);
525
Assert.Equal(Color.
Empty
, control.TransparencyKey);
535
Assert.Equal(Color.
Empty
, control.TransparencyKey);
630
Assert.Equal(Color.
Empty
, control.TransparencyKey);
637
Assert.Equal(Color.
Empty
, control.TransparencyKey);
688
Assert.Equal(Color.
Empty
, control.TransparencyKey);
695
Assert.Equal(Color.
Empty
, control.TransparencyKey);
725
Assert.Equal(Color.
Empty
, control.TransparencyKey);
735
Assert.Equal(Color.
Empty
, control.TransparencyKey);
763
Assert.Equal(Color.
Empty
, control.TransparencyKey);
772
Assert.Equal(Color.
Empty
, control.TransparencyKey);
807
Assert.Equal(Color.
Empty
, control.TransparencyKey);
816
Assert.Equal(Color.
Empty
, control.TransparencyKey);
905
Assert.Equal(Color.
Empty
, control.TransparencyKey);
915
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1268
yield return new object[] { allowTransparency, Color.
Empty
, allowTransparency };
1300
yield return new object[] { allowTransparency, Color.
Empty
};
1334
yield return new object[] { allowTransparency, Color.
Empty
};
1367
yield return new object[] { allowTransparency, Color.
Empty
};
1430
control.TransparencyKey = Color.
Empty
;
1433
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1440
control.TransparencyKey = Color.
Empty
;
1443
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1504
control.TransparencyKey = Color.
Empty
;
1507
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1514
control.TransparencyKey = Color.
Empty
;
1517
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1579
control.TransparencyKey = Color.
Empty
;
1582
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1589
control.TransparencyKey = Color.
Empty
;
1592
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1648
control.TransparencyKey = Color.
Empty
;
1651
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1658
control.TransparencyKey = Color.
Empty
;
1661
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1717
control.TransparencyKey = Color.
Empty
;
1720
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1727
control.TransparencyKey = Color.
Empty
;
1730
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1773
yield return new object[] { true, Color.
Empty
, true, 1 };
1777
yield return new object[] { false, Color.
Empty
, false, 0 };
System\Windows\Forms\GroupBoxTests.cs (1)
1829
foreach (Color foreColor in new Color[] { Color.Red, Color.
Empty
})
System\Windows\Forms\HtmlDocumentTests.cs (1)
319
yield return new object[] { Color.
Empty
, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), "#000000" };
System\Windows\Forms\ImageList.ImageCollectionTests.cs (12)
153
yield return new object[] { pixelFormat, Color.
Empty
, Color.
Empty
};
161
yield return new object[] { PixelFormat.Format1bppIndexed, Color.
Empty
, Color.
Empty
, Color.FromArgb(255, 0, 0, 0) };
190
if (pixel00Color != Color.
Empty
)
192
if (givenPixel10Color != Color.
Empty
)
240
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
420
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
575
foreach (Color listTransparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
577
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
644
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
889
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
System\Windows\Forms\ListBoxTests.cs (6)
349
yield return new object[] { Color.
Empty
, SystemColors.Window };
372
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
429
control.BackColor = Color.
Empty
;
1240
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1266
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1326
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ListViewInsertionMarkTests.cs (3)
284
Assert.NotEqual(Color.
Empty
, insertionMark.Color);
302
Assert.NotEqual(Color.
Empty
, insertionMark.Color);
370
control.InsertionMark.Color = Color.
Empty
;
System\Windows\Forms\ListViewItemConverterTests.cs (8)
193
new object[] { new string[] { "text3" }, 1, Color.Blue, Color.
Empty
, null }
199
new object[] { new string[] { "text4" }, 1, Color.
Empty
, Color.Blue, null }
205
new object[] { new string[] { "text5" }, 1, Color.
Empty
, Color.
Empty
, SystemFonts.MenuFont }
211
new object[] { new string[] { "text3" }, "imageKey", Color.Blue, Color.
Empty
, null }
217
new object[] { new string[] { "text4" }, "imageKey", Color.
Empty
, Color.Blue, null }
223
new object[] { new string[] { "text5" }, "imageKey", Color.
Empty
, Color.
Empty
, SystemFonts.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (26)
44
yield return new object[] { null, null, Color.
Empty
, Color.
Empty
, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
45
yield return new object[] { Array.Empty<string>(), null, Color.
Empty
, Color.
Empty
, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
46
yield return new object[] { new string[] { null }, string.Empty, Color.
Empty
, Color.
Empty
, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
82
yield return new object[] { null, -1, Color.
Empty
, Color.
Empty
, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
83
yield return new object[] { Array.Empty<string>(), 0, Color.
Empty
, Color.
Empty
, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
84
yield return new object[] { new string[] { null }, 1, Color.
Empty
, Color.
Empty
, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty };
120
yield return new object[] { null, null, Color.
Empty
, Color.
Empty
, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
121
yield return new object[] { Array.Empty<string>(), null, Color.
Empty
, Color.
Empty
, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
122
yield return new object[] { new string[] { null }, string.Empty, Color.
Empty
, Color.
Empty
, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
158
yield return new object[] { null, -1, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
159
yield return new object[] { Array.Empty<string>(), 0, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
160
yield return new object[] { new string[] { null }, 1, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
849
yield return new object[] { Color.
Empty
, SystemColors.Window };
904
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
System\Windows\Forms\ListViewSubItemCollectionTests.cs (4)
258
yield return new object[] { null, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
388
yield return new object[] { Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window };
System\Windows\Forms\ListViewSubItemTests.cs (6)
55
yield return new object[] { null, null, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
136
yield return new object[] { Color.
Empty
, SystemColors.Window };
157
yield return new object[] { Color.
Empty
, Color.Red };
384
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
408
yield return new object[] { Color.
Empty
, Color.Red };
System\Windows\Forms\ListViewTests.cs (6)
452
yield return new object[] { Color.
Empty
, SystemColors.Window };
475
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
542
control.BackColor = Color.
Empty
;
1308
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1334
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1404
control.ForeColor = Color.
Empty
;
System\Windows\Forms\MdiClientTests.cs (1)
131
control.BackColor = Color.
Empty
;
System\Windows\Forms\MonthCalendarTests.cs (9)
281
yield return new object[] { Color.
Empty
, SystemColors.Window };
304
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
361
control.BackColor = Color.
Empty
;
921
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
947
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1007
control.ForeColor = Color.
Empty
;
2768
Assert.Throws<ArgumentException>("value", () => calendar.TitleBackColor = Color.
Empty
);
2827
Assert.Throws<ArgumentException>("value", () => calendar.TitleForeColor = Color.
Empty
);
2981
Assert.Throws<ArgumentException>("value", () => calendar.TrailingForeColor = Color.
Empty
);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (4)
17
Assert.Equal(Color.
Empty
, bag.BackColor);
19
Assert.Equal(Color.
Empty
, bag.ForeColor);
98
Assert.Equal(Color.
Empty
, bag.BackColor);
100
Assert.Equal(Color.
Empty
, bag.ForeColor);
System\Windows\Forms\PictureBoxTests.cs (1)
456
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ProgressBarTests.cs (2)
554
yield return new object[] { Color.
Empty
, ProgressBar.DefaultForeColor, 1 };
610
control.ForeColor = Color.
Empty
;
System\Windows\Forms\PropertyGridTests.cs (9)
304
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
364
control.BackColor = Color.
Empty
;
698
yield return new object[] { Color.
Empty
};
861
yield return new object[] { Color.
Empty
, Color.Red };
1109
yield return new object[] { Color.
Empty
, Color.FromArgb(255, 133, 133, 133) };
1272
yield return new object[] { Color.
Empty
, Color.FromArgb(255, 0, 0, 255) };
1632
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
1689
control.ForeColor = Color.
Empty
;
3367
yield return new object[] { Color.
Empty
, SystemColors.ControlText };
System\Windows\Forms\RichTextBoxTests.cs (22)
119
Assert.Equal(Color.
Empty
, control.SelectionBackColor);
646
yield return new object[] { Color.
Empty
, SystemColors.Window };
669
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
726
control.BackColor = Color.
Empty
;
1677
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1703
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1802
control.ForeColor = Color.
Empty
;
3838
yield return new object[] { 0, 0, 0x78563412, Color.
Empty
};
3845
yield return new object[] { CFM_MASK.CFM_ALLCAPS, 0, 0x78563412, Color.
Empty
};
3893
Assert.Equal(Color.
Empty
, control.SelectionBackColor);
3902
Assert.Equal(Color.
Empty
, control.SelectionBackColor);
3907
yield return new object[] { Color.
Empty
};
3931
yield return new object[] { Color.
Empty
, SystemColors.Window };
3982
yield return new object[] { Color.
Empty
};
4517
yield return new object[] { 0, 0x785634, Color.
Empty
};
4518
yield return new object[] { 0, 0x78563412, Color.
Empty
};
4519
yield return new object[] { 0, 0, Color.
Empty
};
4545
Assert.Equal(Color.
Empty
, control.SelectionColor);
4559
yield return new object[] { Color.
Empty
, Color.Black };
4627
yield return new object[] { Color.
Empty
};
4638
Assert.Equal(Color.
Empty
, control.SelectionColor);
4643
Assert.Equal(Color.
Empty
, control.SelectionColor);
System\Windows\Forms\ScrollableControlTests.cs (20)
1514
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout };
1518
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout };
1587
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1591
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1596
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1600
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1603
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1607
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1630
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1632
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1646
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1650
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1653
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1657
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1787
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1791
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1796
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1800
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1803
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1807
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\ScrollBarTests.cs (2)
233
control.BackColor = Color.
Empty
;
582
control.ForeColor = Color.
Empty
;
System\Windows\Forms\SplitterTests.cs (2)
814
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
870
control.ForeColor = Color.
Empty
;
System\Windows\Forms\TabControlTests.cs (4)
530
yield return new object[] { Color.
Empty
};
604
control.BackColor = Color.
Empty
;
941
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
998
control.ForeColor = Color.
Empty
;
System\Windows\Forms\TabPageTests.cs (16)
827
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
883
control.BackColor = Color.
Empty
;
3962
yield return new object[] { true, Color.
Empty
, backgroundImage, backgroundImageLayout };
3966
yield return new object[] { false, Color.
Empty
, backgroundImage, backgroundImageLayout };
4016
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4020
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4025
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4029
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4032
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4036
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4155
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4159
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4164
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4168
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4171
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4175
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\TextRendererTests.cs (18)
26
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
};
55
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
, Color.Blue };
60
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.
Empty
};
89
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
, TextFormatFlags.Default, };
126
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
, Color.Blue, TextFormatFlags.Default, };
131
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.
Empty
, TextFormatFlags.Default, };
170
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
};
201
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
, Color.Blue };
206
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.
Empty
};
237
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
, TextFormatFlags.Default, };
277
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
, Color.Blue, TextFormatFlags.Default, };
282
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.
Empty
, TextFormatFlags.Default, };
620
Color.
Empty
,
627
Color.
Empty
,
628
Color.
Empty
,
635
Color.
Empty
,
642
Color.
Empty
,
643
Color.
Empty
,
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (3)
14
Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty, Color.
Empty
, ArrowDirection.Up));
21
yield return new object[] { graphics, null, Rectangle.Empty, Color.
Empty
, ArrowDirection.Down + 1 };
61
yield return new object[] { Color.
Empty
};
System\Windows\Forms\ToolStripButtonTests.cs (6)
64
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
145
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
232
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
322
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
410
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
508
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (1)
83
bitmap.GetPixel(50, 50).Should().NotBe(Color.
Empty
);
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
625
yield return new object[] { Color.
Empty
, Color.Blue };
657
yield return new object[] { Color.
Empty
, Color.Blue, Color.Blue };
709
control.BackColor = Color.
Empty
;
System\Windows\Forms\ToolStripControlHostTests.cs (5)
93
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
307
item.BackColor = Color.
Empty
;
1126
item.ForeColor = Color.
Empty
;
1207
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
1333
foreach (Color color in new Color[] { Color.
Empty
, Color.Red })
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
64
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
153
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
252
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
360
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1746
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ToolStripItemTests.cs (21)
63
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
148
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
243
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
1661
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
1722
item.BackColor = Color.
Empty
;
3351
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
3415
item.ForeColor = Color.
Empty
;
3781
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
3811
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
3885
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
5599
foreach (Color color in new Color[] { Color.
Empty
, Color.Red })
5666
yield return new object[] { null, Color.
Empty
, 0 };
5668
yield return new object[] { new Bitmap(10, 10), Color.
Empty
, 0 };
5670
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.
Empty
, 0 };
5672
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.
Empty
, 0 };
5733
yield return new object[] { null, Color.
Empty
, 0 };
5735
yield return new object[] { new Bitmap(10, 10), Color.
Empty
, 0 };
5737
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.
Empty
, 0 };
5739
yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.
Empty
, 0 };
5789
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
5805
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (3)
12
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.
Empty
, null, TextFormatFlags.Top - 1 };
37
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.
Empty
, null, ContentAlignment.TopLeft - 1, TextFormatFlags.Default | TextFormatFlags.Top | TextFormatFlags.HidePrefix };
72
yield return new object[] { Color.
Empty
};
System\Windows\Forms\ToolStripLabelTests.cs (3)
224
{ nameof(ToolStripLabel.ActiveLinkColor), Color.
Empty
, false },
226
{ nameof(ToolStripLabel.LinkColor), Color.
Empty
, false },
228
{ nameof(ToolStripLabel.VisitedLinkColor), Color.
Empty
, false }
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
68
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripRendererTests.cs (7)
30
yield return new object[] { null, Rectangle.Empty, Color.
Empty
, arrowDirection };
34
yield return new object[] { null, Rectangle.Empty, Color.
Empty
, ArrowDirection.Left - 1 };
35
yield return new object[] { null, Rectangle.Empty, Color.
Empty
, ArrowDirection.Up + 1 };
294
yield return new object[] { new SubToolStripItem(), null, Rectangle.Empty, Color.
Empty
, null, TextFormatFlags.Left };
295
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 0, 4), Color.
Empty
, null, TextFormatFlags.Left };
296
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 0), Color.
Empty
, null, TextFormatFlags.Left };
297
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 4), Color.
Empty
, null, TextFormatFlags.Left };
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (5)
52
yield return new object[] { new ToolStrip(), new Rectangle(1, 2, 3, 4), Color.
Empty
, SystemColors.Control };
53
yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(1, 2, 3, 4), Color.
Empty
, Color.Red };
54
yield return new object[] { new ToolStripDropDown(), new Rectangle(1, 2, 3, 4), Color.
Empty
, SystemColors.Menu };
55
yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4), Color.
Empty
, SystemColors.MenuBar };
94
ToolStripRenderEventArgs e = new(graphics, toolStrip, new Rectangle(1, 2, 3, 4), Color.
Empty
);
System\Windows\Forms\ToolStripSeparatorTests.cs (4)
61
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
372
item.ForeColor = Color.
Empty
;
417
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
527
foreach (Color color in new Color[] { Color.
Empty
, Color.Red })
System\Windows\Forms\ToolStripTests.cs (22)
1059
yield return new object[] { Color.
Empty
, Control.DefaultBackColor };
2711
control.ForeColor = Color.
Empty
;
5855
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout };
5859
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout };
5929
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
5933
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
5938
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5942
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5945
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5949
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5980
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, expected1 };
5982
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, expected1 };
5996
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
5998
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6003
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6005
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6126
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
6130
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
6135
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6139
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6142
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6146
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\ToolTipTests.cs (1)
353
Assert.Throws<ArgumentException>("value", () => toolTip.ForeColor = Color.
Empty
);
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
19
Assert.Equal(Color.
Empty
, treeNode.BackColor);
27
Assert.Equal(Color.
Empty
, treeNode.ForeColor);
System\Windows\Forms\TreeNodeTests.cs (16)
17
Assert.Equal(Color.
Empty
, node.BackColor);
22
Assert.Equal(Color.
Empty
, node.ForeColor);
57
Assert.Equal(Color.
Empty
, node.BackColor);
62
Assert.Equal(Color.
Empty
, node.ForeColor);
105
Assert.Equal(Color.
Empty
, node.BackColor);
110
Assert.Equal(Color.
Empty
, node.ForeColor);
148
Assert.Equal(Color.
Empty
, node.BackColor);
153
Assert.Equal(Color.
Empty
, node.ForeColor);
196
Assert.Equal(Color.
Empty
, node.BackColor);
201
Assert.Equal(Color.
Empty
, node.ForeColor);
296
yield return new object[] { Color.
Empty
, 0 };
333
yield return new object[] { Color.
Empty
};
378
yield return new object[] { Color.
Empty
, 1 };
737
yield return new object[] { Color.
Empty
, 0 };
774
yield return new object[] { Color.
Empty
};
819
yield return new object[] { Color.
Empty
, 1 };
System\Windows\Forms\TreeViewTests.cs (6)
86
Assert.Equal(Color.
Empty
, control.LineColor);
698
yield return new object[] { Color.
Empty
, SystemColors.Window };
721
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
778
control.BackColor = Color.
Empty
;
1459
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1520
control.ForeColor = Color.
Empty
;
System\Windows\Forms\UpDownBaseTests.cs (6)
510
yield return new object[] { Color.
Empty
, SystemColors.Window };
533
yield return new object[] { Color.
Empty
, SystemColors.Window, 1 };
589
control.BackColor = Color.
Empty
;
935
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1012
control.ForeColor = Color.
Empty
;
2229
foreach (Color backColor in new Color[] { Color.Red, Color.
Empty
})
System\Windows\Forms\VisualStyles\VisualStyleInformationTests.cs (2)
55
Assert.NotEqual(Color.
Empty
, color);
142
Assert.NotEqual(Color.
Empty
, color);
TextBoxBaseTests.cs (5)
383
yield return new object[] { Color.
Empty
, SystemColors.Window };
428
control.BackColor = Color.
Empty
;
1161
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1187
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1247
control.ForeColor = Color.
Empty
;
TrackBarTests.cs (2)
688
yield return new object[] { Color.
Empty
};
761
control.ForeColor = Color.
Empty
;
System.Windows.Forms.TestUtilities (2)
CommonTestHelperEx.cs (2)
18
{ Color.
Empty
, Control.DefaultBackColor }
30
{ Color.
Empty
, Control.DefaultForeColor }
WindowsFormsIntegration (3)
System\Windows\Integration\ElementHost.cs (2)
1551
if (control.BackColor != SD.Color.
Empty
&& control.BackColor.A == 255)
1556
return SD.Color.
Empty
;
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
378
SD.Color wfColor = SD.Color.
Empty
;