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