733 references to Empty
BinaryFormatTests (1)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (1)
203
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)
808
if (!value.Equals(Color.
Empty
) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255)
2948
Color oldBackColor = Color.
Empty
;
2949
Color oldForeColor = Color.
Empty
;
9066
BackColor = Color.
Empty
;
9095
ForeColor = Color.
Empty
;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
161
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)
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)
2266
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, cellStyle.ForeColor);
2277
ControlPaint.DrawFocusRectangle(g, focusBounds, Color.
Empty
, cellStyle.ForeColor);
2282
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)
1201
ControlPaint.DrawFocusRectangle(graphics, bounds, Color.
Empty
, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
716
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)
2784
Color subItemForeColor = Color.
Empty
;
2785
Color subItemBackColor = Color.
Empty
;
2815
Color riFore = Color.
Empty
;
2816
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
)
1609
internal Color RawBackColor => Properties.GetValueOrDefault(s_backColorProperty, Color.
Empty
);
3282
private bool ShouldSerializeImageTransparentColor() => ImageTransparentColor != Color.
Empty
;
3372
public virtual void ResetBackColor() => BackColor = Color.
Empty
;
3381
public virtual void ResetForeColor() => ForeColor = Color.
Empty
;
3396
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)
1022
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)
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)
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)
1189
Color.
Empty
,
1190
Color.
Empty
);
1218
Color.
Empty
,
1219
Color.
Empty
);
1244
Color.
Empty
,
1245
Color.
Empty
);
1264
Color.
Empty
,
1265
Color.
Empty
);
1447
if (foreColor == Color.
Empty
|| backColor == Color.
Empty
)
1720
=> DrawFrameControl(graphics, x, y, width, height, DFC_TYPE.DFC_MENU, (DFCS_STATE)glyph, Color.
Empty
, Color.
Empty
);
1752
Color.
Empty
,
1753
Color.
Empty
);
1772
Color.
Empty
,
1773
Color.
Empty
);
1856
Color.
Empty
,
1857
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)
1311
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)
26
yield return new object[] { Color.
Empty
};
System.Windows.Forms.Tests (511)
System\Windows\Forms\AmbientPropertiesTests.cs (2)
18
Assert.Equal(Color.
Empty
, property.BackColor);
21
Assert.Equal(Color.
Empty
, property.ForeColor);
System\Windows\Forms\ButtonBaseTests.cs (6)
697
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 1 };
753
control.BackColor = Color.
Empty
;
1034
Assert.Equal(Color.
Empty
, appearance.BorderColor);
1036
Assert.Equal(Color.
Empty
, appearance.CheckedBackColor);
1037
Assert.Equal(Color.
Empty
, appearance.MouseDownBackColor);
1038
Assert.Equal(Color.
Empty
, appearance.MouseOverBackColor);
System\Windows\Forms\ColorDialogTests.cs (2)
44
Assert.Equal(Color.
Empty
, dialog.Color);
109
yield return new object[] { Color.
Empty
, Color.Black };
System\Windows\Forms\ComboBoxTests.cs (6)
167
yield return new object[] { Color.
Empty
, SystemColors.Window };
190
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
267
control.BackColor = Color.
Empty
;
1049
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1075
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1135
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ControlPaintTests.cs (23)
15
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format1bppIndexed), Color.
Empty
};
16
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppRgb), Color.
Empty
};
17
yield return new object[] { new Bitmap(10, 10, PixelFormat.Format32bppArgb), Color.
Empty
};
544
yield return new object[] { Rectangle.Empty, Color.
Empty
, style };
545
yield return new object[] { new Rectangle(1, 2, -3, -4), Color.
Empty
, style };
553
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
, style };
1195
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
, Color.Blue };
1199
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.Red, Color.
Empty
};
1271
yield return new object[] { new Rectangle(1, 2, 3, 4), new Size(1, 1), Color.
Empty
};
1316
yield return new object[] { new Bitmap(10, 10), 0, 0, Color.
Empty
};
1324
yield return new object[] { new Metafile("bitmaps/telescope_01.wmf"), 0, 0, Color.
Empty
};
1418
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.
Empty
, Color.Blue };
1422
yield return new object[] { new Rectangle(1, 2, 3, 4), glyph, Color.Red, Color.
Empty
};
1682
yield return new object[] { Rectangle.Empty, Color.
Empty
, style };
1683
yield return new object[] { new Rectangle(1, 2, -3, -4), Color.
Empty
, style };
1691
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
, style };
1712
yield return new object[] { new Point(1, 2), new Point(2, 3), Color.
Empty
};
1720
yield return new object[] { new Point(1, 2), new Point(2, 3), Color.
Empty
};
1828
yield return new object[] { active, new Rectangle(0, 1, 4, 5), new Rectangle(1, 2, 3, 4), Color.
Empty
};
1860
yield return new object[] { Color.
Empty
, new Rectangle(1, 2, 3, 4) };
1909
yield return new object[] { s, SystemFonts.MenuFont, Color.
Empty
, new RectangleF(1, 2, 3, 4), new StringFormat() };
1957
yield return new object[] { s, SystemFonts.MenuFont, Color.
Empty
, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
2018
yield return new object[] { new Rectangle(1, 2, 3, 4), Color.
Empty
};
System\Windows\Forms\ControlTests.Handlers.cs (34)
2770
yield return new object[] { true, Color.
Empty
, null };
2771
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty) };
2772
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2773
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2783
yield return new object[] { false, Color.
Empty
, null };
2784
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty) };
2785
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)) };
2786
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)) };
2875
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty), 0 };
2876
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2877
yield return new object[] { true, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
2885
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(Rectangle.Empty), 0 };
2886
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(100, 200, 300, 400)), 0 };
2887
yield return new object[] { false, Color.
Empty
, new InvalidateEventArgs(new Rectangle(1, 2, 300, 400)), 0 };
3842
yield return new object[] { true, Color.
Empty
, backgroundImage, backgroundImageLayout };
3846
yield return new object[] { false, Color.
Empty
, backgroundImage, backgroundImageLayout };
3905
yield return new object[] { parent, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3909
yield return new object[] { parent, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3914
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3918
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3921
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3925
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
3949
yield return new object[] { parent, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3951
yield return new object[] { parent, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
3958
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3960
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
3965
yield return new object[] { parent, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
3967
yield return new object[] { parent, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
4077
yield return new object[] { true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4081
yield return new object[] { false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4086
yield return new object[] { true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4090
yield return new object[] { false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4093
yield return new object[] { true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4097
yield return new object[] { false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\ControlTests.Methods.cs (14)
4528
yield return new object[] { true, Color.
Empty
, null };
4529
yield return new object[] { true, Color.
Empty
, Rectangle.Empty };
4530
yield return new object[] { true, Color.
Empty
, new Rectangle(100, 200, 300, 400) };
4531
yield return new object[] { true, Color.
Empty
, new Rectangle(1, 2, 300, 400) };
4541
yield return new object[] { false, Color.
Empty
, null };
4542
yield return new object[] { false, Color.
Empty
, Rectangle.Empty };
4543
yield return new object[] { false, Color.
Empty
, new Rectangle(100, 200, 300, 400) };
4544
yield return new object[] { false, Color.
Empty
, new Rectangle(1, 2, 300, 400) };
4633
yield return new object[] { true, Color.
Empty
, Rectangle.Empty, 0 };
4634
yield return new object[] { true, Color.
Empty
, new Rectangle(100, 200, 300, 400), 0 };
4635
yield return new object[] { true, Color.
Empty
, new Rectangle(1, 2, 300, 400), 0 };
4643
yield return new object[] { false, Color.
Empty
, Rectangle.Empty, 0 };
4644
yield return new object[] { false, Color.
Empty
, new Rectangle(100, 200, 300, 400), 0 };
4645
yield return new object[] { false, Color.
Empty
, new Rectangle(1, 2, 300, 400), 0 };
System\Windows\Forms\ControlTests.Properties.cs (9)
1267
yield return new object[] { Color.
Empty
, Control.DefaultBackColor };
1344
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
1400
control.BackColor = Color.
Empty
;
1495
control.BackColor = Color.
Empty
;
1575
control.BackColor = Color.
Empty
;
5385
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
5441
control.ForeColor = Color.
Empty
;
5536
control.ForeColor = Color.
Empty
;
5616
control.ForeColor = Color.
Empty
;
System\Windows\Forms\DataGridViewCellStyleTests.cs (24)
21
Assert.Equal(Color.
Empty
, style.BackColor);
24
Assert.Equal(Color.
Empty
, style.ForeColor);
32
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
33
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
87
Assert.Equal(Color.
Empty
, style.BackColor);
90
Assert.Equal(Color.
Empty
, style.ForeColor);
98
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
99
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
155
style.BackColor = Color.
Empty
;
156
Assert.Equal(Color.
Empty
, style.BackColor);
313
style.ForeColor = Color.
Empty
;
314
Assert.Equal(Color.
Empty
, style.ForeColor);
531
style.SelectionBackColor = Color.
Empty
;
532
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
557
style.SelectionForeColor = Color.
Empty
;
558
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);
821
Assert.Equal(Color.
Empty
, style.BackColor);
824
Assert.Equal(Color.
Empty
, style.ForeColor);
832
Assert.Equal(Color.
Empty
, style.SelectionBackColor);
833
Assert.Equal(Color.
Empty
, style.SelectionForeColor);
System\Windows\Forms\DataGridViewTests.cs (4)
795
yield return new object[] { new DataGridViewCellStyle { BackColor = Color.
Empty
} };
796
yield return new object[] { new DataGridViewCellStyle { ForeColor = Color.
Empty
} };
797
yield return new object[] { new DataGridViewCellStyle { SelectionBackColor = Color.
Empty
} };
798
yield return new object[] { new DataGridViewCellStyle { SelectionForeColor = Color.
Empty
} };
System\Windows\Forms\DataGridViewTests.Rendering.cs (3)
58
State.Pen(1, Color.
Empty
, PEN_STYLE.PS_NULL),
89
State.Pen(1, Color.
Empty
, PEN_STYLE.PS_NULL),
97
State.Brush(Color.
Empty
, BRUSH_STYLE.BS_NULL),
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
158
Assert.Equal(Color.
Empty
, control.TransparencyKey);
System\Windows\Forms\DrawItemEventArgsTests.cs (2)
40
yield return new object[] { null, Rectangle.Empty, -2, DrawItemState.None - 1, Color.
Empty
, Color.
Empty
};
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (4)
15
yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(ListViewItemStates.Checked - 1), Color.
Empty
, Color.
Empty
, null };
107
yield return new object[] { new Rectangle(-1, -2, -3, -4), 0, ListViewItemStates.Default, Color.
Empty
, Color.
Empty
, null };
System\Windows\Forms\DrawToolTipEventArgsTests.cs (8)
15
yield return new object[] { null, null, Rectangle.Empty, null, Color.
Empty
, Color.
Empty
, null };
37
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), null, Color.
Empty
, Color.
Empty
, null };
38
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), string.Empty, Color.
Empty
, Color.
Empty
, null };
39
yield return new object[] { null, null, new Rectangle(-1, -2, -3, -4), "tooltipText", Color.
Empty
, Color.
Empty
, null };
System\Windows\Forms\FontDialogTests.cs (2)
52
Assert.Equal(Color.
Empty
, dialog.Color);
166
yield return new object[] { Color.
Empty
, Color.Black };
System\Windows\Forms\FormTests.cs (55)
160
Assert.Equal(Color.
Empty
, control.TransparencyKey);
317
Assert.Equal(Color.
Empty
, control.TransparencyKey);
324
Assert.Equal(Color.
Empty
, control.TransparencyKey);
331
Assert.Equal(Color.
Empty
, control.TransparencyKey);
339
yield return new object[] { false, Color.
Empty
, 1 };
367
Assert.Equal(Color.
Empty
, control.TransparencyKey);
382
Assert.Equal(Color.
Empty
, control.TransparencyKey);
389
Assert.Equal(Color.
Empty
, control.TransparencyKey);
396
Assert.Equal(Color.
Empty
, control.TransparencyKey);
417
Assert.Equal(Color.
Empty
, control.TransparencyKey);
427
Assert.Equal(Color.
Empty
, control.TransparencyKey);
437
Assert.Equal(Color.
Empty
, control.TransparencyKey);
448
yield return new object[] { false, Color.
Empty
, 1, 1 };
490
Assert.Equal(Color.
Empty
, control.TransparencyKey);
517
Assert.Equal(Color.
Empty
, control.TransparencyKey);
527
Assert.Equal(Color.
Empty
, control.TransparencyKey);
537
Assert.Equal(Color.
Empty
, control.TransparencyKey);
632
Assert.Equal(Color.
Empty
, control.TransparencyKey);
639
Assert.Equal(Color.
Empty
, control.TransparencyKey);
690
Assert.Equal(Color.
Empty
, control.TransparencyKey);
697
Assert.Equal(Color.
Empty
, control.TransparencyKey);
727
Assert.Equal(Color.
Empty
, control.TransparencyKey);
737
Assert.Equal(Color.
Empty
, control.TransparencyKey);
765
Assert.Equal(Color.
Empty
, control.TransparencyKey);
774
Assert.Equal(Color.
Empty
, control.TransparencyKey);
809
Assert.Equal(Color.
Empty
, control.TransparencyKey);
818
Assert.Equal(Color.
Empty
, control.TransparencyKey);
907
Assert.Equal(Color.
Empty
, control.TransparencyKey);
917
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1270
yield return new object[] { allowTransparency, Color.
Empty
, allowTransparency };
1302
yield return new object[] { allowTransparency, Color.
Empty
};
1336
yield return new object[] { allowTransparency, Color.
Empty
};
1369
yield return new object[] { allowTransparency, Color.
Empty
};
1432
control.TransparencyKey = Color.
Empty
;
1435
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1442
control.TransparencyKey = Color.
Empty
;
1445
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1506
control.TransparencyKey = Color.
Empty
;
1509
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1516
control.TransparencyKey = Color.
Empty
;
1519
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1581
control.TransparencyKey = Color.
Empty
;
1584
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1591
control.TransparencyKey = Color.
Empty
;
1594
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1650
control.TransparencyKey = Color.
Empty
;
1653
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1660
control.TransparencyKey = Color.
Empty
;
1663
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1719
control.TransparencyKey = Color.
Empty
;
1722
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1729
control.TransparencyKey = Color.
Empty
;
1732
Assert.Equal(Color.
Empty
, control.TransparencyKey);
1775
yield return new object[] { true, Color.
Empty
, true, 1 };
1779
yield return new object[] { false, Color.
Empty
, false, 0 };
System\Windows\Forms\GroupBoxTests.cs (1)
1831
foreach (Color foreColor in new Color[] { Color.Red, Color.
Empty
})
System\Windows\Forms\HtmlDocumentTests.cs (1)
321
yield return new object[] { Color.
Empty
, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), "#000000" };
System\Windows\Forms\ImageList.ImageCollectionTests.cs (12)
155
yield return new object[] { pixelFormat, Color.
Empty
, Color.
Empty
};
163
yield return new object[] { PixelFormat.Format1bppIndexed, Color.
Empty
, Color.
Empty
, Color.FromArgb(255, 0, 0, 0) };
192
if (pixel00Color != Color.
Empty
)
194
if (givenPixel10Color != Color.
Empty
)
242
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
422
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
577
foreach (Color listTransparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
579
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
646
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
891
foreach (Color transparentColor in new Color[] { Color.Transparent, Color.FromArgb(0x12, 0x34, 0x56, 0x78), Color.
Empty
, Color.Black })
System\Windows\Forms\ListBoxTests.cs (6)
351
yield return new object[] { Color.
Empty
, SystemColors.Window };
374
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
431
control.BackColor = Color.
Empty
;
1242
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1268
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1328
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ListViewInsertionMarkTests.cs (3)
286
Assert.NotEqual(Color.
Empty
, insertionMark.Color);
304
Assert.NotEqual(Color.
Empty
, insertionMark.Color);
372
control.InsertionMark.Color = Color.
Empty
;
System\Windows\Forms\ListViewItemConverterTests.cs (8)
195
new object[] { new string[] { "text3" }, 1, Color.Blue, Color.
Empty
, null }
201
new object[] { new string[] { "text4" }, 1, Color.
Empty
, Color.Blue, null }
207
new object[] { new string[] { "text5" }, 1, Color.
Empty
, Color.
Empty
, SystemFonts.MenuFont }
213
new object[] { new string[] { "text3" }, "imageKey", Color.Blue, Color.
Empty
, null }
219
new object[] { new string[] { "text4" }, "imageKey", Color.
Empty
, Color.Blue, null }
225
new object[] { new string[] { "text5" }, "imageKey", Color.
Empty
, Color.
Empty
, SystemFonts.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (26)
46
yield return new object[] { null, null, Color.
Empty
, Color.
Empty
, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
47
yield return new object[] { Array.Empty<string>(), null, Color.
Empty
, Color.
Empty
, null, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
48
yield return new object[] { new string[] { null }, string.Empty, Color.
Empty
, Color.
Empty
, null, new ListViewGroup(), string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
84
yield return new object[] { null, -1, Color.
Empty
, Color.
Empty
, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
85
yield return new object[] { Array.Empty<string>(), 0, Color.
Empty
, Color.
Empty
, null, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
86
yield return new object[] { new string[] { null }, 1, Color.
Empty
, Color.
Empty
, null, new ListViewGroup(), SystemColors.WindowText, SystemColors.Window, string.Empty };
122
yield return new object[] { null, null, Color.
Empty
, Color.
Empty
, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
123
yield return new object[] { Array.Empty<string>(), null, Color.
Empty
, Color.
Empty
, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
124
yield return new object[] { new string[] { null }, string.Empty, Color.
Empty
, Color.
Empty
, null, string.Empty, SystemColors.WindowText, SystemColors.Window, string.Empty };
160
yield return new object[] { null, -1, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
161
yield return new object[] { Array.Empty<string>(), 0, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
162
yield return new object[] { new string[] { null }, 1, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
851
yield return new object[] { Color.
Empty
, SystemColors.Window };
906
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
System\Windows\Forms\ListViewSubItemCollectionTests.cs (4)
259
yield return new object[] { null, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
389
yield return new object[] { Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window };
System\Windows\Forms\ListViewSubItemTests.cs (6)
56
yield return new object[] { null, null, Color.
Empty
, Color.
Empty
, null, SystemColors.WindowText, SystemColors.Window, string.Empty };
137
yield return new object[] { Color.
Empty
, SystemColors.Window };
158
yield return new object[] { Color.
Empty
, Color.Red };
385
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
409
yield return new object[] { Color.
Empty
, Color.Red };
System\Windows\Forms\ListViewTests.cs (6)
454
yield return new object[] { Color.
Empty
, SystemColors.Window };
477
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
544
control.BackColor = Color.
Empty
;
1310
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1336
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1406
control.ForeColor = Color.
Empty
;
System\Windows\Forms\MdiClientTests.cs (1)
133
control.BackColor = Color.
Empty
;
System\Windows\Forms\MonthCalendarTests.cs (9)
283
yield return new object[] { Color.
Empty
, SystemColors.Window };
306
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
363
control.BackColor = Color.
Empty
;
923
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
949
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1009
control.ForeColor = Color.
Empty
;
2770
Assert.Throws<ArgumentException>("value", () => calendar.TitleBackColor = Color.
Empty
);
2829
Assert.Throws<ArgumentException>("value", () => calendar.TitleForeColor = Color.
Empty
);
2983
Assert.Throws<ArgumentException>("value", () => calendar.TrailingForeColor = Color.
Empty
);
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (4)
19
Assert.Equal(Color.
Empty
, bag.BackColor);
21
Assert.Equal(Color.
Empty
, bag.ForeColor);
100
Assert.Equal(Color.
Empty
, bag.BackColor);
102
Assert.Equal(Color.
Empty
, bag.ForeColor);
System\Windows\Forms\PictureBoxTests.cs (1)
458
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ProgressBarTests.cs (2)
556
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 1 };
612
control.ForeColor = Color.
Empty
;
System\Windows\Forms\PropertyGridTests.cs (9)
306
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
366
control.BackColor = Color.
Empty
;
700
yield return new object[] { Color.
Empty
};
863
yield return new object[] { Color.
Empty
, Color.Red };
1111
yield return new object[] { Color.
Empty
, Color.FromArgb(255, 133, 133, 133) };
1274
yield return new object[] { Color.
Empty
, Color.FromArgb(255, 0, 0, 255) };
1634
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
1691
control.ForeColor = Color.
Empty
;
3369
yield return new object[] { Color.
Empty
, SystemColors.ControlText };
System\Windows\Forms\RichTextBoxTests.cs (22)
121
Assert.Equal(Color.
Empty
, control.SelectionBackColor);
648
yield return new object[] { Color.
Empty
, SystemColors.Window };
671
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
728
control.BackColor = Color.
Empty
;
1679
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1705
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1804
control.ForeColor = Color.
Empty
;
3840
yield return new object[] { 0, 0, 0x78563412, Color.
Empty
};
3847
yield return new object[] { CFM_MASK.CFM_ALLCAPS, 0, 0x78563412, Color.
Empty
};
3895
Assert.Equal(Color.
Empty
, control.SelectionBackColor);
3904
Assert.Equal(Color.
Empty
, control.SelectionBackColor);
3909
yield return new object[] { Color.
Empty
};
3933
yield return new object[] { Color.
Empty
, SystemColors.Window };
3984
yield return new object[] { Color.
Empty
};
4519
yield return new object[] { 0, 0x785634, Color.
Empty
};
4520
yield return new object[] { 0, 0x78563412, Color.
Empty
};
4521
yield return new object[] { 0, 0, Color.
Empty
};
4547
Assert.Equal(Color.
Empty
, control.SelectionColor);
4561
yield return new object[] { Color.
Empty
, Color.Black };
4629
yield return new object[] { Color.
Empty
};
4640
Assert.Equal(Color.
Empty
, control.SelectionColor);
4645
Assert.Equal(Color.
Empty
, control.SelectionColor);
System\Windows\Forms\ScrollableControlTests.cs (20)
1516
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout };
1520
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout };
1589
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1593
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1598
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1602
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1605
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1609
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1632
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1634
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1648
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1652
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1655
yield return new object[] { parentFactory(), hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1659
yield return new object[] { parentFactory(), hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected1 };
1789
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1793
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
1798
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1802
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
1805
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
1809
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\ScrollBarTests.cs (2)
235
control.BackColor = Color.
Empty
;
584
control.ForeColor = Color.
Empty
;
System\Windows\Forms\SplitterTests.cs (2)
816
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
872
control.ForeColor = Color.
Empty
;
System\Windows\Forms\TabControlTests.cs (4)
532
yield return new object[] { Color.
Empty
};
606
control.BackColor = Color.
Empty
;
943
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
1000
control.ForeColor = Color.
Empty
;
System\Windows\Forms\TabPageTests.cs (16)
829
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
885
control.BackColor = Color.
Empty
;
3964
yield return new object[] { true, Color.
Empty
, backgroundImage, backgroundImageLayout };
3968
yield return new object[] { false, Color.
Empty
, backgroundImage, backgroundImageLayout };
4018
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4022
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4027
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4031
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4034
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4038
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4157
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4161
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
4166
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4170
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
4173
yield return new object[] { appearance, useVisualStyleBackColor, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
4177
yield return new object[] { appearance, useVisualStyleBackColor, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\TextRendererTests.cs (18)
28
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
};
57
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
, Color.Blue };
62
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.
Empty
};
91
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
, TextFormatFlags.Default, };
128
yield return new object[] { hint, text, SystemFonts.MenuFont, new Point(1, 2), Color.
Empty
, Color.Blue, TextFormatFlags.Default, };
133
yield return new object[] { hint, text, SystemFonts.MenuFont, Point.Empty, Color.Red, Color.
Empty
, TextFormatFlags.Default, };
172
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
};
203
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
, Color.Blue };
208
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.
Empty
};
239
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
, TextFormatFlags.Default, };
279
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.
Empty
, Color.Blue, TextFormatFlags.Default, };
284
yield return new object[] { hint, text, SystemFonts.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.
Empty
, TextFormatFlags.Default, };
622
Color.
Empty
,
629
Color.
Empty
,
630
Color.
Empty
,
637
Color.
Empty
,
644
Color.
Empty
,
645
Color.
Empty
,
System\Windows\Forms\ToolStripArrowRenderEventArgsTests.cs (3)
16
Assert.Throws<ArgumentNullException>(() => new ToolStripArrowRenderEventArgs(null, toolStripButton, Rectangle.Empty, Color.
Empty
, ArrowDirection.Up));
23
yield return new object[] { graphics, null, Rectangle.Empty, Color.
Empty
, ArrowDirection.Down + 1 };
63
yield return new object[] { Color.
Empty
};
System\Windows\Forms\ToolStripButtonTests.cs (6)
66
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
147
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
234
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
324
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
412
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
510
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapterTests.cs (1)
81
bitmap.GetPixel(50, 50).Should().NotBe(Color.
Empty
);
System\Windows\Forms\ToolStripContentPanelTests.cs (3)
627
yield return new object[] { Color.
Empty
, Color.Blue };
659
yield return new object[] { Color.
Empty
, Color.Blue, Color.Blue };
711
control.BackColor = Color.
Empty
;
System\Windows\Forms\ToolStripControlHostTests.cs (5)
95
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
309
item.BackColor = Color.
Empty
;
1128
item.ForeColor = Color.
Empty
;
1209
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
1335
foreach (Color color in new Color[] { Color.
Empty
, Color.Red })
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
66
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
155
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
254
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
362
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1748
control.ForeColor = Color.
Empty
;
System\Windows\Forms\ToolStripItemTests.cs (21)
65
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
150
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
245
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
1663
yield return new object[] { Color.
Empty
, Control.DefaultBackColor, 0 };
1724
item.BackColor = Color.
Empty
;
3353
yield return new object[] { Color.
Empty
, Control.DefaultForeColor, 0 };
3417
item.ForeColor = Color.
Empty
;
3783
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
3813
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
3887
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
5601
foreach (Color color in new Color[] { Color.
Empty
, Color.Red })
5668
yield return new object[] { null, Color.
Empty
, 0 };
5670
yield return new object[] { new Bitmap(10, 10), Color.
Empty
, 0 };
5672
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "nature24bits.gif")), Color.
Empty
, 0 };
5674
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "10x16_one_entry_32bit.ico")), Color.
Empty
, 0 };
5735
yield return new object[] { null, Color.
Empty
, 0 };
5737
yield return new object[] { new Bitmap(10, 10), Color.
Empty
, 0 };
5739
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "nature24bits.gif")), Color.
Empty
, 0 };
5741
yield return new object[] { Image.FromFile(Path.Join("bitmaps", "10x16_one_entry_32bit.ico")), Color.
Empty
, 0 };
5791
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
5807
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (3)
14
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.
Empty
, null, TextFormatFlags.Top - 1 };
39
yield return new object[] { new ToolStripButton(), null, Rectangle.Empty, Color.
Empty
, null, ContentAlignment.TopLeft - 1, TextFormatFlags.Default | TextFormatFlags.Top | TextFormatFlags.HidePrefix };
74
yield return new object[] { Color.
Empty
};
System\Windows\Forms\ToolStripLabelTests.cs (3)
222
{ nameof(ToolStripLabel.ActiveLinkColor), Color.
Empty
, false },
224
{ nameof(ToolStripLabel.LinkColor), Color.
Empty
, false },
226
{ nameof(ToolStripLabel.VisitedLinkColor), Color.
Empty
, false }
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
66
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
System\Windows\Forms\ToolStripRendererTests.cs (7)
32
yield return new object[] { null, Rectangle.Empty, Color.
Empty
, arrowDirection };
36
yield return new object[] { null, Rectangle.Empty, Color.
Empty
, ArrowDirection.Left - 1 };
37
yield return new object[] { null, Rectangle.Empty, Color.
Empty
, ArrowDirection.Up + 1 };
296
yield return new object[] { new SubToolStripItem(), null, Rectangle.Empty, Color.
Empty
, null, TextFormatFlags.Left };
297
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 0, 4), Color.
Empty
, null, TextFormatFlags.Left };
298
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 0), Color.
Empty
, null, TextFormatFlags.Left };
299
yield return new object[] { new SubToolStripItem(), null, new Rectangle(1, 2, 3, 4), Color.
Empty
, null, TextFormatFlags.Left };
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (5)
54
yield return new object[] { new ToolStrip(), new Rectangle(1, 2, 3, 4), Color.
Empty
, SystemColors.Control };
55
yield return new object[] { new ToolStrip() { BackColor = Color.Red }, new Rectangle(1, 2, 3, 4), Color.
Empty
, Color.Red };
56
yield return new object[] { new ToolStripDropDown(), new Rectangle(1, 2, 3, 4), Color.
Empty
, SystemColors.Menu };
57
yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4), Color.
Empty
, SystemColors.MenuBar };
96
ToolStripRenderEventArgs e = new(graphics, toolStrip, new Rectangle(1, 2, 3, 4), Color.
Empty
);
System\Windows\Forms\ToolStripSeparatorTests.cs (4)
63
Assert.Equal(Color.
Empty
, item.ImageTransparentColor);
374
item.ForeColor = Color.
Empty
;
419
foreach (Color imageTransparentColor in new Color[] { Color.
Empty
, Color.Red })
529
foreach (Color color in new Color[] { Color.
Empty
, Color.Red })
System\Windows\Forms\ToolStripTests.cs (22)
1061
yield return new object[] { Color.
Empty
, Control.DefaultBackColor };
2713
control.ForeColor = Color.
Empty
;
5857
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout };
5861
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout };
5931
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
5935
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
5940
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5944
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
5947
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5951
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
5982
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, expected1 };
5984
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, expected1 };
5998
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6000
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, expected1 };
6005
yield return new object[] { parent, hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6007
yield return new object[] { parent, hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, expected2 };
6128
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
6132
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, backgroundImage, backgroundImageLayout, 0 };
6137
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6141
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.None, 0 };
6144
yield return new object[] { hScroll, vScroll, true, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
6148
yield return new object[] { hScroll, vScroll, false, Color.
Empty
, new Bitmap(10, 10, PixelFormat.Format32bppArgb), ImageLayout.Tile, 1 };
System\Windows\Forms\ToolTipTests.cs (1)
355
Assert.Throws<ArgumentException>("value", () => toolTip.ForeColor = Color.
Empty
);
System\Windows\Forms\TreeNodeCollectionTests.cs (2)
21
Assert.Equal(Color.
Empty
, treeNode.BackColor);
29
Assert.Equal(Color.
Empty
, treeNode.ForeColor);
System\Windows\Forms\TreeNodeTests.cs (16)
19
Assert.Equal(Color.
Empty
, node.BackColor);
24
Assert.Equal(Color.
Empty
, node.ForeColor);
59
Assert.Equal(Color.
Empty
, node.BackColor);
64
Assert.Equal(Color.
Empty
, node.ForeColor);
107
Assert.Equal(Color.
Empty
, node.BackColor);
112
Assert.Equal(Color.
Empty
, node.ForeColor);
150
Assert.Equal(Color.
Empty
, node.BackColor);
155
Assert.Equal(Color.
Empty
, node.ForeColor);
198
Assert.Equal(Color.
Empty
, node.BackColor);
203
Assert.Equal(Color.
Empty
, node.ForeColor);
298
yield return new object[] { Color.
Empty
, 0 };
335
yield return new object[] { Color.
Empty
};
380
yield return new object[] { Color.
Empty
, 1 };
739
yield return new object[] { Color.
Empty
, 0 };
776
yield return new object[] { Color.
Empty
};
821
yield return new object[] { Color.
Empty
, 1 };
System\Windows\Forms\TreeViewTests.cs (6)
88
Assert.Equal(Color.
Empty
, control.LineColor);
700
yield return new object[] { Color.
Empty
, SystemColors.Window };
723
yield return new object[] { Color.
Empty
, SystemColors.Window, 0 };
780
control.BackColor = Color.
Empty
;
1461
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1522
control.ForeColor = Color.
Empty
;
System\Windows\Forms\UpDownBaseTests.cs (6)
512
yield return new object[] { Color.
Empty
, SystemColors.Window };
535
yield return new object[] { Color.
Empty
, SystemColors.Window, 1 };
591
control.BackColor = Color.
Empty
;
937
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1014
control.ForeColor = Color.
Empty
;
2231
foreach (Color backColor in new Color[] { Color.Red, Color.
Empty
})
System\Windows\Forms\VisualStyles\VisualStyleInformationTests.cs (2)
57
Assert.NotEqual(Color.
Empty
, color);
144
Assert.NotEqual(Color.
Empty
, color);
TextBoxBaseTests.cs (5)
385
yield return new object[] { Color.
Empty
, SystemColors.Window };
430
control.BackColor = Color.
Empty
;
1163
yield return new object[] { Color.
Empty
, SystemColors.WindowText };
1189
yield return new object[] { Color.
Empty
, SystemColors.WindowText, 0 };
1249
control.ForeColor = Color.
Empty
;
TrackBarTests.cs (2)
690
yield return new object[] { Color.
Empty
};
763
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)
1542
if (control.BackColor != SD.Color.
Empty
&& control.BackColor.A == 255)
1547
return SD.Color.
Empty
;
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
377
SD.Color wfColor = SD.Color.
Empty
;