1 override of ForeColor
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
213
public override Color
ForeColor
38 writes to ForeColor
System.Windows.Forms (4)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
3377
public virtual void ResetForeColor() =>
ForeColor
= Color.Empty;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
507
menuItem.
ForeColor
= ForeColor;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
18
ForeColor
= SystemColors.ControlDark;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
231
_splitButtonButton.
ForeColor
= ForeColor;
System.Windows.Forms.Design (4)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
1911
item.
ForeColor
= _defaultBorderColor;
1941
item.
ForeColor
= _defaultBorderColor;
1950
item.
ForeColor
= _defaultBorderColor;
1958
item.
ForeColor
= _defaultBorderColor;
System.Windows.Forms.Tests (30)
System\Windows\Forms\ToolStripButtonTests.cs (3)
1278
ForeColor
= Color.Red,
1369
ForeColor
= Color.Red,
1468
ForeColor
= Color.Red,
System\Windows\Forms\ToolStripItemTests.cs (18)
3267
ForeColor
= value
3272
item.
ForeColor
= value;
3286
item.
ForeColor
= value;
3291
item.
ForeColor
= value;
3313
item.
ForeColor
= value;
3321
item.
ForeColor
= value;
3339
item.
ForeColor
= value;
3344
item.
ForeColor
= value;
3375
item.
ForeColor
= value;
3383
item.
ForeColor
= value;
3405
item.
ForeColor
= Color.Red;
3410
item.
ForeColor
= Color.Red;
3415
item.
ForeColor
= Color.Empty;
3421
item.
ForeColor
= Color.Red;
3433
item.
ForeColor
= Color.Red;
3449
item.
ForeColor
= Color.Red;
12600
item.
ForeColor
= Color.Red;
14149
item.
ForeColor
= Color.Black;
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
287
ForeColor
= Color.Blue,
System\Windows\Forms\ToolStripSeparatorTests.cs (8)
339
ForeColor
= value
344
item.
ForeColor
= value;
362
item.
ForeColor
= Color.Red;
367
item.
ForeColor
= Color.Red;
372
item.
ForeColor
= Color.Empty;
378
item.
ForeColor
= Color.Red;
390
item.
ForeColor
= Color.Red;
406
item.
ForeColor
= Color.Red;
66 references to ForeColor
System.Windows.Forms (12)
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (1)
221
renderer.DrawItemText(new ToolStripItemTextRenderEventArgs(e.Graphics, this, Text, InternalLayout.TextRectangle,
ForeColor
, Font, InternalLayout.TextFormat));
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
193
renderer.DrawItemText(new ToolStripItemTextRenderEventArgs(g, this, Text, InternalLayout.TextRectangle,
ForeColor
, Font, InternalLayout.TextFormat));
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
879
Color previous =
ForeColor
;
881
if (!previous.Equals(
ForeColor
))
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
356
Color textColor =
ForeColor
;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
507
menuItem.ForeColor =
ForeColor
;
958
textColor =
ForeColor
;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
717
e.DefaultTextColor = e.Item.
ForeColor
;
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (1)
304
internal override bool ShouldSerializeForeColor() =>
ForeColor
!= SystemColors.ControlDark;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (2)
231
_splitButtonButton.ForeColor =
ForeColor
;
528
renderer.DrawItemText(new ToolStripItemTextRenderEventArgs(g, this, SplitButtonButton.Text, SplitButtonButtonLayout.TextRectangle,
ForeColor
, Font, SplitButtonButtonLayout.TextFormat));
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
704
using var foreColorPen = item.
ForeColor
.GetCachedPenScope();
System.Windows.Forms.Tests (54)
System\Windows\Forms\ToolStripButtonTests.cs (6)
57
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
138
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
225
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
315
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
403
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
501
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
55
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
144
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
243
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
351
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
System\Windows\Forms\ToolStripItemTests.cs (28)
56
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
141
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
236
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
3244
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
3258
Assert.Equal(Color.Red, item.
ForeColor
);
3269
Assert.Equal(expected, item.
ForeColor
);
3273
Assert.Equal(expected, item.
ForeColor
);
3287
Assert.Equal(expected, item.
ForeColor
);
3292
Assert.Equal(expected, item.
ForeColor
);
3314
Assert.Equal(expected, item.
ForeColor
);
3322
Assert.Equal(expected, item.
ForeColor
);
3340
Assert.Equal(expected, item.
ForeColor
);
3345
Assert.Equal(expected, item.
ForeColor
);
3376
Assert.Equal(expected, item.
ForeColor
);
3384
Assert.Equal(expected, item.
ForeColor
);
3406
Assert.Equal(Color.Red, item.
ForeColor
);
3411
Assert.Equal(Color.Red, item.
ForeColor
);
3416
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
3422
Assert.Equal(Color.Red, item.
ForeColor
);
3429
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
ForeColor
)];
3434
Assert.Equal(Color.Red, item.
ForeColor
);
3438
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
3445
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripItem))[nameof(ToolStripItem.
ForeColor
)];
3450
Assert.Equal(Color.Red, item.
ForeColor
);
3454
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
14146
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
14151
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
14155
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
59
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
332
clone.
ForeColor
.Should().Be(original.
ForeColor
);
System\Windows\Forms\ToolStripSeparatorTests.cs (13)
54
Assert.Equal(SystemColors.ControlDark, item.
ForeColor
);
341
Assert.Equal(expected, item.
ForeColor
);
345
Assert.Equal(expected, item.
ForeColor
);
363
Assert.Equal(Color.Red, item.
ForeColor
);
368
Assert.Equal(Color.Red, item.
ForeColor
);
373
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
379
Assert.Equal(Color.Red, item.
ForeColor
);
386
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripSeparator))[nameof(ToolStripSeparator.
ForeColor
)];
391
Assert.Equal(Color.Red, item.
ForeColor
);
395
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);
402
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(ToolStripSeparator))[nameof(ToolStripSeparator.
ForeColor
)];
407
Assert.Equal(Color.Red, item.
ForeColor
);
411
Assert.Equal(Control.DefaultForeColor, item.
ForeColor
);