207 references to IsEmpty
System.ComponentModel.TypeConverter (1)
System\Drawing\ColorConverter.cs (1)
101if (c.IsEmpty)
System.Drawing.Primitives (4)
System\Drawing\ColorTranslator.cs (4)
253if (c.IsEmpty && string.Equals(htmlColor, "LightGrey", StringComparison.OrdinalIgnoreCase)) 259if (c.IsEmpty) 270if (c.IsEmpty) 292if (c.IsEmpty)
System.Windows.Forms (199)
System\Windows\Forms\Control.cs (11)
1059if (!c.IsEmpty) 1079if (c.IsEmpty) 1088return !c.IsEmpty && IsValidBackColor(c) ? c : DefaultBackColor; 2278if (!color.IsEmpty) 2293if (color.IsEmpty) 2302return !color.IsEmpty ? color : DefaultForeColor; 2667private bool IsValidBackColor(Color c) => c.IsEmpty || GetStyle(ControlStyles.SupportsTransparentBackColor) || c.A == 255; 7377if (backColor.IsEmpty) 7781if (foreColor.IsEmpty) 11362return !backColor.IsEmpty; 11381internal virtual bool ShouldSerializeForeColor() => !Properties.GetValueOrDefault<Color>(s_foreColorProperty).IsEmpty;
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (1)
1370get => (_isEnableVisualStyleBackgroundSet || (RawBackColor.IsEmpty && (BackColor == SystemColors.Control)))
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (13)
23bool hasCustomBorder = Control.FlatAppearance.BorderSize != BorderSize || !Control.FlatAppearance.BorderColor.IsEmpty; 27up: !Control.FlatAppearance.CheckedBackColor.IsEmpty 33if (!Control.FlatAppearance.BorderColor.IsEmpty) 42if (!Control.FlatAppearance.CheckedBackColor.IsEmpty) 116bool hasCustomBorder = (Control.FlatAppearance.BorderSize != BorderSize || !Control.FlatAppearance.BorderColor.IsEmpty); 120!Control.FlatAppearance.CheckedBackColor.IsEmpty 126if (!Control.FlatAppearance.BorderColor.IsEmpty) 135if (!Control.FlatAppearance.MouseDownBackColor.IsEmpty) 210bool hasCustomBorder = Control.FlatAppearance.BorderSize != BorderSize || !Control.FlatAppearance.BorderColor.IsEmpty; 214up: !Control.FlatAppearance.CheckedBackColor.IsEmpty || state == CheckState.Unchecked, 219if (!Control.FlatAppearance.BorderColor.IsEmpty) 226Color backColor = !Control.FlatAppearance.MouseOverBackColor.IsEmpty 228: !Control.FlatAppearance.CheckedBackColor.IsEmpty
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (1)
89Color? customBorderColor = Control.FlatAppearance.BorderColor.IsEmpty
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (4)
67=> FlatAppearance is { BorderColor.IsEmpty: false } appearance 174&& FlatAppearance is { MouseOverBackColorCore.IsEmpty: false } hoverAppearance) 180&& FlatAppearance is { MouseDownBackColorCore.IsEmpty: false } pressedAppearance) 192if (!customBaseColor.IsEmpty)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonColorMath.cs (2)
62if (customBaseColor.IsEmpty && isDefault) 67Color baseColor = customBaseColor.IsEmpty
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (1)
133if (FlatAppearance is { BorderColor.IsEmpty: false } appearance)
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (1)
89Color? customBorderColor = Control.FlatAppearance.BorderColor.IsEmpty
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (4)
119get => _mouseDownBackColor.IsEmpty 146get => _mouseOverBackColor.IsEmpty 167private bool ShouldSerializeMouseDownBackColor() => !_mouseDownBackColor.IsEmpty; 171private bool ShouldSerializeMouseOverBackColor() => !_mouseOverBackColor.IsEmpty;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (2)
1016if (value.IsEmpty) 2652if (value.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (11)
2849if (cellStyle is not null && !cellStyle.BackColor.IsEmpty) 2853else if (!columnHeadersStyle.BackColor.IsEmpty) 2862if (cellStyle is not null && !cellStyle.ForeColor.IsEmpty) 2866else if (!columnHeadersStyle.ForeColor.IsEmpty) 2875if (cellStyle is not null && !cellStyle.SelectionBackColor.IsEmpty) 2879else if (!columnHeadersStyle.SelectionBackColor.IsEmpty) 2888if (cellStyle is not null && !cellStyle.SelectionForeColor.IsEmpty) 2892else if (!columnHeadersStyle.SelectionForeColor.IsEmpty) 2902if (cellStyle is not null && !cellStyle.SortGlyphColor.IsEmpty) 2906else if (!columnHeadersStyle.SortGlyphColor.IsEmpty) 2910else if (!dataGridViewStyle.SortGlyphColor.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (4)
214return (!defaultCellStyle.BackColor.IsEmpty || 215!defaultCellStyle.ForeColor.IsEmpty || 216!defaultCellStyle.SelectionBackColor.IsEmpty || 217!defaultCellStyle.SelectionForeColor.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (24)
1931if (cellStyle is not null && !cellStyle.BackColor.IsEmpty) 1935else if (rowStyle is not null && !rowStyle.BackColor.IsEmpty) 1939else if (!DataGridView.RowsDefaultCellStyle.BackColor.IsEmpty && 1940(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.BackColor.IsEmpty)) 1944else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.BackColor.IsEmpty) 1948else if (columnStyle is not null && !columnStyle.BackColor.IsEmpty) 1957if (cellStyle is not null && !cellStyle.ForeColor.IsEmpty) 1961else if (rowStyle is not null && !rowStyle.ForeColor.IsEmpty) 1965else if (!DataGridView.RowsDefaultCellStyle.ForeColor.IsEmpty && 1966(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.ForeColor.IsEmpty)) 1970else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.ForeColor.IsEmpty) 1974else if (columnStyle is not null && !columnStyle.ForeColor.IsEmpty) 1983if (cellStyle is not null && !cellStyle.SelectionBackColor.IsEmpty) 1987else if (rowStyle is not null && !rowStyle.SelectionBackColor.IsEmpty) 1991else if (!DataGridView.RowsDefaultCellStyle.SelectionBackColor.IsEmpty && 1992(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.SelectionBackColor.IsEmpty)) 1996else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.SelectionBackColor.IsEmpty) 2000else if (columnStyle is not null && !columnStyle.SelectionBackColor.IsEmpty) 2009if (cellStyle is not null && !cellStyle.SelectionForeColor.IsEmpty) 2013else if (rowStyle is not null && !rowStyle.SelectionForeColor.IsEmpty) 2017else if (!DataGridView.RowsDefaultCellStyle.SelectionForeColor.IsEmpty && 2018(rowIndex % 2 == 0 || DataGridView.AlternatingRowsDefaultCellStyle.SelectionForeColor.IsEmpty)) 2022else if (rowIndex % 2 == 1 && !DataGridView.AlternatingRowsDefaultCellStyle.SelectionForeColor.IsEmpty) 2026else if (columnStyle is not null && !columnStyle.SelectionForeColor.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (5)
399if (!dataGridViewCellStyle.BackColor.IsEmpty) 404if (!dataGridViewCellStyle.ForeColor.IsEmpty) 409if (!dataGridViewCellStyle.SelectionBackColor.IsEmpty) 414if (!dataGridViewCellStyle.SelectionForeColor.IsEmpty) 464if (!dataGridViewCellStyle.SortGlyphColor.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (4)
300return (!defaultCellStyle.BackColor.IsEmpty || 301!defaultCellStyle.ForeColor.IsEmpty || 302!defaultCellStyle.SelectionBackColor.IsEmpty || 303!defaultCellStyle.SelectionForeColor.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (8)
215return (!defaultCellStyle.BackColor.IsEmpty || 216!defaultCellStyle.ForeColor.IsEmpty || 217!defaultCellStyle.SelectionBackColor.IsEmpty || 218!defaultCellStyle.SelectionForeColor.IsEmpty || 447if (columnStyle is not null && !columnStyle.BackColor.IsEmpty) 456if (columnStyle is not null && !columnStyle.ForeColor.IsEmpty) 465if (columnStyle is not null && !columnStyle.SelectionBackColor.IsEmpty) 474if (columnStyle is not null && !columnStyle.SelectionForeColor.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (9)
301if (cellStyle is not null && !cellStyle.BackColor.IsEmpty) 305else if (!columnHeadersStyle.BackColor.IsEmpty) 314if (cellStyle is not null && !cellStyle.ForeColor.IsEmpty) 318else if (!columnHeadersStyle.ForeColor.IsEmpty) 327if (cellStyle is not null && !cellStyle.SelectionBackColor.IsEmpty) 331else if (!columnHeadersStyle.SelectionBackColor.IsEmpty) 340if (cellStyle is not null && !cellStyle.SelectionForeColor.IsEmpty) 344else if (!columnHeadersStyle.SelectionForeColor.IsEmpty) 1013if (sortGlyphColor.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (4)
276return (!defaultCellStyle.BackColor.IsEmpty || 277!defaultCellStyle.ForeColor.IsEmpty || 278!defaultCellStyle.SelectionBackColor.IsEmpty || 279!defaultCellStyle.SelectionForeColor.IsEmpty ||
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (24)
615if (cellStyle is not null && !cellStyle.BackColor.IsEmpty) 619else if (!rowHeadersStyle.BackColor.IsEmpty) 628if (cellStyle is not null && !cellStyle.ForeColor.IsEmpty) 632else if (!rowHeadersStyle.ForeColor.IsEmpty) 641if (cellStyle is not null && !cellStyle.SelectionBackColor.IsEmpty) 645else if (!rowHeadersStyle.SelectionBackColor.IsEmpty) 654if (cellStyle is not null && !cellStyle.SelectionForeColor.IsEmpty) 658else if (!rowHeadersStyle.SelectionForeColor.IsEmpty) 813if (rowStyle is not null && !rowStyle.BackColor.IsEmpty) 817else if (!rowsDefaultCellStyle.BackColor.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.BackColor.IsEmpty)) 821else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.BackColor.IsEmpty) 830if (rowStyle is not null && !rowStyle.ForeColor.IsEmpty) 834else if (!rowsDefaultCellStyle.ForeColor.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.ForeColor.IsEmpty)) 838else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.ForeColor.IsEmpty) 847if (rowStyle is not null && !rowStyle.SelectionBackColor.IsEmpty) 851else if (!rowsDefaultCellStyle.SelectionBackColor.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.SelectionBackColor.IsEmpty)) 855else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.SelectionBackColor.IsEmpty) 864if (rowStyle is not null && !rowStyle.SelectionForeColor.IsEmpty) 868else if (!rowsDefaultCellStyle.SelectionForeColor.IsEmpty && (rowIndex % 2 == 0 || alternatingRowsDefaultCellStyle.SelectionForeColor.IsEmpty)) 872else if (rowIndex % 2 == 1 && !alternatingRowsDefaultCellStyle.SelectionForeColor.IsEmpty)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (8)
326if (cellStyle is not null && !cellStyle.BackColor.IsEmpty) 330else if (!rowHeadersStyle.BackColor.IsEmpty) 339if (cellStyle is not null && !cellStyle.ForeColor.IsEmpty) 343else if (!rowHeadersStyle.ForeColor.IsEmpty) 352if (cellStyle is not null && !cellStyle.SelectionBackColor.IsEmpty) 356else if (!rowHeadersStyle.SelectionBackColor.IsEmpty) 365if (cellStyle is not null && !cellStyle.SelectionForeColor.IsEmpty) 369else if (!rowHeadersStyle.SelectionForeColor.IsEmpty)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (5)
184if (value.IsEmpty) 244if (value.IsEmpty) 267if (value.IsEmpty) 290if (value.IsEmpty) 313if (value.IsEmpty)
System\Windows\Forms\Controls\Labels\LinkLabel.cs (9)
72get => !_activeLinkColor.IsEmpty 94get => _disabledLinkColor.IsEmpty ? IEDisabledLinkColor : _disabledLinkColor; 140if (s_iedisabledLinkColor.IsEmpty) 241get => !_linkColor.IsEmpty 356get => !_visitedLinkColor.IsEmpty 1604internal bool ShouldSerializeActiveLinkColor() => !_activeLinkColor.IsEmpty; 1609internal bool ShouldSerializeDisabledLinkColor() => !_disabledLinkColor.IsEmpty; 1628internal bool ShouldSerializeLinkColor() => !_linkColor.IsEmpty; 1643private bool ShouldSerializeVisitedLinkColor() => !_visitedLinkColor.IsEmpty;
System\Windows\Forms\Controls\Labels\LinkUtilities.cs (3)
78if (s_ielinkColor.IsEmpty) 91if (s_ieactiveLinkColor.IsEmpty) 104if (s_ievisitedLinkColor.IsEmpty)
System\Windows\Forms\Controls\ListView\ListView.cs (2)
2852nmcd->clrText = !haveRenderInfo || riFore.IsEmpty 2895nmcd->clrTextBk = !haveRenderInfo || riBack.IsEmpty
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (2)
69if (_color.IsEmpty) 138if (!_color.IsEmpty)
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (2)
115return !style.backColor.IsEmpty; 133return !style.foreColor.IsEmpty;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (3)
908if (value.IsEmpty) 929if (value.IsEmpty) 950if (value.IsEmpty)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (7)
515if (!c.IsEmpty) 869if (!foreColor.IsEmpty) 1202if (!color.IsEmpty) 2889if (backColor.IsEmpty) 2937if (foreColor.IsEmpty) 3288return !backColor.IsEmpty; 3302return !foreColor.IsEmpty;
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (6)
95if (_activeLinkColor.IsEmpty) 166if (_linkColor.IsEmpty) 210if (_visitedLinkColor.IsEmpty) 296return !_activeLinkColor.IsEmpty; 302return !_linkColor.IsEmpty; 308return !_visitedLinkColor.IsEmpty;
System\Windows\Forms\Controls\TreeView\TreeNode.cs (4)
194if (value.IsEmpty) 202if (!oldbk.IsEmpty) 420if (value.IsEmpty) 428if (!oldfc.IsEmpty)
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2789if (renderinfo is not null && !riFore.IsEmpty) 2794if (renderinfo is not null && !riBack.IsEmpty)
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (1)
62set => _color = !value.IsEmpty ? value : Color.Black;
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (1)
105if (!value.IsEmpty)
System\Windows\Forms\Form.cs (2)
593if (!c.IsEmpty) 6210if (transparencyKey.IsEmpty)
System\Windows\Forms\OwnerDrawPropertyBag.cs (2)
77public virtual bool IsEmpty() => Font is null && ForeColor.IsEmpty && BackColor.IsEmpty;
System\Windows\Forms\Rendering\Button\AnimatedPopupButtonRenderer.cs (3)
147borderColor = flatAppearance.BorderColor.IsEmpty 245Color hoverColor = !flatAppearance.MouseOverBackColorCore.IsEmpty 250Color pressedColor = !flatAppearance.MouseDownBackColorCore.IsEmpty
System\Windows\Forms\Rendering\Button\PopupButtonKeyCapRenderer.cs (1)
339if (!palette.TextOutline.IsEmpty)
System\Windows\Forms\Rendering\TextExtensions.cs (2)
69using var textColor = foreColor.IsEmpty ? default : new SetTextColorScope(hdc, foreColor); 72BACKGROUND_MODE newBackGroundMode = (backColor.IsEmpty || backColor == Color.Transparent)
System\Windows\Forms\ToolTip\ToolTip.cs (1)
244if (value.IsEmpty)
System.Windows.Forms.Design (3)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
38if (!borderColor.IsEmpty)
System\Windows\Forms\Design\DocumentDesigner.cs (2)
133if (value.IsEmpty) 1307if (!ShadowProperties.Contains(nameof(BackColor)) || ((Color)ShadowProperties[nameof(BackColor)]).IsEmpty)