Implemented interface member:
75 references to Equals
System.Drawing.Common.Tests (1)
Helpers.cs (1)
122if (!pixel.Equals(emptyColor))
System.Drawing.Primitives (1)
System\Drawing\Color.cs (1)
585public override bool Equals([NotNullWhen(true)] object? obj) => obj is Color other && Equals(other);
System.Windows.Forms (63)
System\Windows\Forms\Control.cs (7)
809if (!value.Equals(Color.Empty) && !GetStyle(ControlStyles.SupportsTransparentBackColor) && value.A < 255) 816if (!previous.Equals(BackColor)) 2032if (!previous.Equals(ForeColor)) 2981if (checkForeColor && !oldForeColor.Equals(ForeColor)) 2986if (checkBackColor && !oldBackColor.Equals(BackColor)) 4191if (!oldForeColor.Equals(ForeColor)) 4196if (!oldBackColor.Equals(BackColor))
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
297&& cacheCheckColor.Equals(checkColor)
System\Windows\Forms\Controls\Buttons\FlatButtonAppearance.cs (1)
72if (value.Equals(Color.Transparent))
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (4)
1020if (!value.Equals(_backgroundColor)) 1068private bool ShouldSerializeBackgroundColor() => !BackgroundColor.Equals(s_defaultBackgroundColor); 2645if (!value.Equals(GridPenColor)) 2661private bool ShouldSerializeGridColor() => !GridPenColor.Equals(DefaultGridColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (4)
113if (!previous.Equals(value)) 164if (!previous.Equals(value)) 313if (!previous.Equals(value)) 327if (!previous.Equals(value))
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (12)
63if (!value.Equals(ActiveLinkColor)) 85if (!value.Equals(ActiveLinkColor)) 96return !ActiveLinkColor.Equals(SystemColors.HotTrack); 99return !ActiveLinkColor.Equals(LinkUtilities.IEActiveLinkColor); 171if (!value.Equals(LinkColor)) 193if (!value.Equals(LinkColor)) 201? !LinkColor.Equals(SystemColors.HotTrack) 202: !LinkColor.Equals(LinkUtilities.IELinkColor); 308if (value.Equals(VisitedLinkColor)) 332if (!value.Equals(VisitedLinkColor)) 343return !VisitedLinkColor.Equals(SystemColors.HotTrack); 346return !VisitedLinkColor.Equals(LinkUtilities.IEVisitedLinkColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkColumn.cs (9)
40if (ActiveLinkColor.Equals(value)) 70return !ActiveLinkColor.Equals(SystemColors.HotTrack); 73return !ActiveLinkColor.Equals(LinkUtilities.IEActiveLinkColor); 151if (LinkColor.Equals(value)) 181return !LinkColor.Equals(SystemColors.HotTrack); 184return !LinkColor.Equals(LinkUtilities.IELinkColor); 331if (VisitedLinkColor.Equals(value)) 361return !VisitedLinkColor.Equals(SystemColors.HotTrack); 364return !VisitedLinkColor.Equals(LinkUtilities.IEVisitedLinkColor);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (10)
189if (!value.Equals(_calendarForeColor)) 249if (!value.Equals(_calendarTitleBackColor)) 272if (!value.Equals(_calendarTitleForeColor)) 295if (!value.Equals(_calendarTrailingText)) 318if (!value.Equals(_calendarMonthBackground)) 1357return !CalendarForeColor.Equals(DefaultForeColor); 1373return !_calendarTitleBackColor.Equals(DefaultTitleBackColor); 1381return !_calendarTitleForeColor.Equals(DefaultTitleForeColor); 1389return !_calendarTrailingText.Equals(DefaultTrailingForeColor); 1397return !_calendarMonthBackground.Equals(DefaultMonthBackColor);
System\Windows\Forms\Controls\ImageList\ImageList.cs (1)
749private bool ShouldSerializeTransparentColor() => !TransparentColor.Equals(Color.LightGray);
System\Windows\Forms\Controls\ImageList\ImageList.Original.cs (1)
42Debug.Assert(customTransparentColor.Equals(Color.Transparent), "Specified a custom transparent color then told us to ignore it");
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (3)
1907=> !TrailingForeColor.Equals(s_trailingForeColor); 1910=> !TitleForeColor.Equals(s_defaultTitleForeColor); 1913=> !TitleBackColor.Equals(s_defaultTitleBackColor);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
527if (!previous.Equals(BackColor)) 881if (!previous.Equals(ForeColor))
System\Windows\Forms\Controls\TreeView\TreeNode.cs (2)
215if (!value.Equals(oldbk)) 441if (!value.Equals(oldfc))
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (1)
210private bool ShouldSerializeColor() => !Color.Equals(Color.Black);
System\Windows\Forms\Form.cs (1)
5894return !TransparencyKey.Equals(Color.Empty);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
295internal override bool ShouldSerializeBackColor() => !BackColor.Equals(SystemColors.AppWorkspace); 300internal override bool ShouldSerializeForeColor() => !ForeColor.Equals(Color.White);
System\Windows\Forms\Rendering\ControlPaint.cs (2)
2084if (t_frameBrushActive is null || !s_frameColorActive.Equals(brushColor)) 2214if (t_frameBrushSelected is null || !s_frameColorSelected.Equals(brushColor))
System.Windows.Forms.Design (10)
System\Drawing\Design\ColorEditor.ColorPalette.cs (4)
95if (!value.Equals(_selectedColor)) 135if (GetColorFromCell(x, y).Equals(c)) 205if (SelectedColor.Equals(GetColorFromCell(x, y))) 381if (color.Equals(SelectedColor) && !drawSelected)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
375if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.BackColor.Equals(srcColumn.DefaultCellStyle.BackColor)) 385if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.ForeColor.Equals(srcColumn.DefaultCellStyle.ForeColor)) 400if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.SelectionBackColor.Equals(srcColumn.DefaultCellStyle.SelectionBackColor)) 405if (defaultSrcColumn is null || !defaultSrcColumn.DefaultCellStyle.SelectionForeColor.Equals(srcColumn.DefaultCellStyle.SelectionForeColor))
System\Windows\Forms\Design\DesignerUtils.cs (1)
452return !image.GetPixel(image.Width / 2, image.Height / 2).Equals(testColor);
System\Windows\Forms\Design\ImageListDesigner.cs (1)
81private bool ShouldSerializeTransparentColor() => !TransparentColor.Equals(Color.LightGray);