418 instantiations of DataGridViewCellStyle
PresentationUI (2)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (2)
461
_textCellStyle = new
DataGridViewCellStyle
469
_boolCellStyle = new
DataGridViewCellStyle
System.Windows.Forms (26)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (7)
802
_alternatingRowsDefaultCellStyle = new
DataGridViewCellStyle
();
1539
DataGridViewCellStyle defaultStyle = new
DataGridViewCellStyle
1980
DataGridViewCellStyle defaultCellStyleTmp =
new
(_defaultCellStyle)
2052
DataGridViewCellStyle defaultCellStyle = new
DataGridViewCellStyle
2089
DataGridViewCellStyle defaultStyle = new
DataGridViewCellStyle
3048
internal DataGridViewCellStyle PlaceholderCellStyle => _placeholderCellStyle ??= new
DataGridViewCellStyle
();
3493
_rowsDefaultCellStyle = new
DataGridViewCellStyle
();
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (4)
19347
DataGridViewCellStyle inheritedCellStyle =
new
();
19680
DataGridViewCellStyle inheritedCellStyle =
new
();
28134
DataGridViewCellStyle defaultStyle =
new
();
28155
DataGridViewCellStyle defaultStyle =
new
();
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (2)
87
style = new
DataGridViewCellStyle
();
735
dataGridViewBand.DefaultCellStyle = new
DataGridViewCellStyle
(DefaultCellStyle);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
19
DataGridViewCellStyle defaultCellStyle = new
DataGridViewCellStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
624
dataGridViewCellStyle = new
DataGridViewCellStyle
();
911
dataGridViewCell.Style = new
DataGridViewCellStyle
(Style);
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (1)
444
public virtual DataGridViewCellStyle Clone() =>
new
(this);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
20
DataGridViewCellStyle defaultCellStyle = new
DataGridViewCellStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (1)
441
DataGridViewCellStyle inheritedCellStyleTmp =
new
();
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
284
DataGridViewCellStyle inheritedCellStyleTmp = inheritedCellStyle ?? new
DataGridViewCellStyle
();
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
25
DataGridViewCellStyle defaultCellStyle =
new
()
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (4)
236
DataGridViewCellStyle inheritedRowStyle =
new
();
1427
DataGridViewCellStyle inheritedRowStyle =
new
();
1511
DataGridViewCellStyle inheritedCellStyle =
new
();
1712
DataGridViewCellStyle inheritedCellStyle =
new
();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
309
DataGridViewCellStyle inheritedCellStyleTmp = inheritedCellStyle ?? new
DataGridViewCellStyle
();
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (2)
76
_cellStyle = new
DataGridViewCellStyle
(value);
91
DataGridViewCellStyle cellStyleTmp =
new
(_cellStyle!);
System.Windows.Forms.Design.Tests (2)
System\Windows\Forms\Design\DataGridViewCellStyleBuilderTests.cs (1)
19
builder.CellStyle = new
DataGridViewCellStyle
{ BackColor = Color.Red };
System\Windows\Forms\Design\FormatStringEditorTests.cs (1)
25
_cellStyle =
new
() { Format = "Initial" };
System.Windows.Forms.Tests (384)
System\Windows\Forms\DataGridViewButtonColumnTests.cs (2)
152
DataGridViewCellStyle newStyle = new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomRight };
178
_column.DefaultCellStyle = new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomRight };
System\Windows\Forms\DataGridViewCellFormattingEventArgsTests.cs (5)
14
yield return new object[] { 0, 0, "value", typeof(string), new
DataGridViewCellStyle
() };
15
yield return new object[] { 1, 2, "value", typeof(string), new
DataGridViewCellStyle
() };
46
yield return new object[] { new
DataGridViewCellStyle
() };
53
DataGridViewCellFormattingEventArgs e = new(1, 2, "value", typeof(string), new
DataGridViewCellStyle
())
65
DataGridViewCellFormattingEventArgs e = new(1, 2, "value", typeof(string), new
DataGridViewCellStyle
())
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (18)
14
yield return new object[] { Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All };
15
yield return new object[] { new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), -1, -1, DataGridViewElementStates.Displayed, "value", "formattedValue", "", new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 0, 1, (DataGridViewElementStates)7, "value", "formattedValue", "errorText", new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All };
48
Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewCellPaintingEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All));
55
Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewCellPaintingEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All));
74
Assert.Throws<ArgumentException>("paintParts", () => new DataGridViewCellPaintingEventArgs(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, -2, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, paintParts));
86
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All);
97
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, 0, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
110
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, 0, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
123
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
136
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All);
147
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, 0, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
160
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, 0, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
173
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
186
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle(), DataGridViewPaintParts.All);
197
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, 0, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
210
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, 0, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
223
DataGridViewCellPaintingEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, columnIndex, DataGridViewElementStates.Displayed, null, null, null, new
DataGridViewCellStyle
(), null, DataGridViewPaintParts.All);
System\Windows\Forms\DataGridViewCellParsingEventArgsTests.cs (5)
15
yield return new object[] { 0, 0, "value", typeof(string), new
DataGridViewCellStyle
() };
16
yield return new object[] { 1, 2, "value", typeof(string), new
DataGridViewCellStyle
() };
35
yield return new object[] { new
DataGridViewCellStyle
() };
42
DataGridViewCellParsingEventArgs e = new(1, 2, "value", typeof(string), new
DataGridViewCellStyle
())
54
DataGridViewCellParsingEventArgs e = new(1, 2, "value", typeof(string), new
DataGridViewCellStyle
())
System\Windows\Forms\DataGridViewCellStyleConverterTests.cs (1)
17
_style =
new
();
System\Windows\Forms\DataGridViewCellStyleTests.cs (129)
18
DataGridViewCellStyle style =
new
();
42
DataGridViewCellStyle source =
new
()
58
DataGridViewCellStyle style =
new
(source);
82
DataGridViewCellStyle source =
new
();
83
DataGridViewCellStyle style =
new
(source);
107
Assert.Throws<ArgumentNullException>("dataGridViewCellStyle", () => new
DataGridViewCellStyle
(null));
114
DataGridViewCellStyle style =
new
()
129
DataGridViewCellStyle style =
new
();
137
DataGridViewCellStyle style =
new
()
151
DataGridViewCellStyle style =
new
()
172
DataGridViewCellStyle style =
new
()
189
DataGridViewCellStyle style =
new
()
207
DataGridViewCellStyle style =
new
()
225
DataGridViewCellStyle style =
new
()
238
DataGridViewCellStyle style =
new
()
250
DataGridViewCellStyle style =
new
()
269
DataGridViewCellStyle style =
new
()
283
DataGridViewCellStyle style =
new
()
295
DataGridViewCellStyle style =
new
()
309
DataGridViewCellStyle style =
new
()
321
DataGridViewCellStyle style =
new
()
336
DataGridViewCellStyle style =
new
()
356
DataGridViewCellStyle style =
new
()
372
DataGridViewCellStyle style =
new
()
394
DataGridViewCellStyle style =
new
()
411
DataGridViewCellStyle style =
new
()
429
DataGridViewCellStyle style =
new
()
447
DataGridViewCellStyle style =
new
()
460
DataGridViewCellStyle style =
new
()
472
DataGridViewCellStyle style =
new
()
498
DataGridViewCellStyle style =
new
()
513
DataGridViewCellStyle style =
new
()
527
DataGridViewCellStyle style =
new
()
539
DataGridViewCellStyle style =
new
()
553
DataGridViewCellStyle style =
new
()
565
DataGridViewCellStyle style =
new
()
580
DataGridViewCellStyle style =
new
()
596
DataGridViewCellStyle style =
new
()
611
DataGridViewCellStyle style =
new
();
619
DataGridViewCellStyle source =
new
()
635
DataGridViewCellStyle style =
new
();
661
DataGridViewCellStyle source =
new
();
662
DataGridViewCellStyle style =
new
()
702
DataGridViewCellStyle style =
new
();
710
DataGridViewCellStyle source =
new
()
750
DataGridViewCellStyle source =
new
();
776
ICloneable source = new
DataGridViewCellStyle
816
ICloneable source = new
DataGridViewCellStyle
();
843
yield return new object[] { new
DataGridViewCellStyle
(), new
DataGridViewCellStyle
(), true };
847
new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomCenter },
848
new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomCenter },
853
new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomCenter },
854
new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomRight },
859
new
DataGridViewCellStyle
{ BackColor = Color.Red },
860
new
DataGridViewCellStyle
{ BackColor = Color.Red },
865
new
DataGridViewCellStyle
{ BackColor = Color.Red },
866
new
DataGridViewCellStyle
{ BackColor = Color.Blue },
871
new
DataGridViewCellStyle
{ DataSourceNullValue = "dbNull" },
872
new
DataGridViewCellStyle
{ DataSourceNullValue = "dbNull" },
877
new
DataGridViewCellStyle
{ DataSourceNullValue = "dbNull" },
878
new
DataGridViewCellStyle
{ DataSourceNullValue = "other" },
883
new
DataGridViewCellStyle
{ DataSourceNullValue = null },
884
new
DataGridViewCellStyle
{ DataSourceNullValue = null },
889
new
DataGridViewCellStyle
{ DataSourceNullValue = null },
890
new
DataGridViewCellStyle
{ DataSourceNullValue = "other" },
895
new
DataGridViewCellStyle
{ ForeColor = Color.Red },
896
new
DataGridViewCellStyle
{ ForeColor = Color.Red },
901
new
DataGridViewCellStyle
{ ForeColor = Color.Red },
902
new
DataGridViewCellStyle
{ ForeColor = Color.Blue },
907
new
DataGridViewCellStyle
{ Font = font },
908
new
DataGridViewCellStyle
{ Font = font },
913
new
DataGridViewCellStyle
{ Font = font },
914
new
DataGridViewCellStyle
{ Font = SystemFonts.MenuFont },
919
new
DataGridViewCellStyle
{ Format = "format" },
920
new
DataGridViewCellStyle
{ Format = "format" },
925
new
DataGridViewCellStyle
{ Format = "format" },
926
new
DataGridViewCellStyle
{ Format = "other" },
931
new
DataGridViewCellStyle
{ FormatProvider = formatProvider },
932
new
DataGridViewCellStyle
{ FormatProvider = formatProvider },
937
new
DataGridViewCellStyle
{ FormatProvider = formatProvider },
938
new
DataGridViewCellStyle
{ FormatProvider = CultureInfo.CurrentCulture },
943
new
DataGridViewCellStyle
{ NullValue = "null" },
944
new
DataGridViewCellStyle
{ NullValue = "null" },
949
new
DataGridViewCellStyle
{ NullValue = "null" },
950
new
DataGridViewCellStyle
{ NullValue = "other" },
955
new
DataGridViewCellStyle
{ NullValue = null },
956
new
DataGridViewCellStyle
{ NullValue = null },
961
new
DataGridViewCellStyle
{ NullValue = null },
962
new
DataGridViewCellStyle
{ NullValue = "other" },
967
new
DataGridViewCellStyle
{ Padding = new Padding(1, 2, 3, 4) },
968
new
DataGridViewCellStyle
{ Padding = new Padding(1, 2, 3, 4) },
973
new
DataGridViewCellStyle
{ Padding = new Padding(1, 2, 3, 4) },
974
new
DataGridViewCellStyle
{ Padding = new Padding(2, 3, 4, 5) },
979
new
DataGridViewCellStyle
{ SelectionBackColor = Color.Red },
980
new
DataGridViewCellStyle
{ SelectionBackColor = Color.Red },
985
new
DataGridViewCellStyle
{ SelectionBackColor = Color.Red },
986
new
DataGridViewCellStyle
{ SelectionBackColor = Color.Blue },
991
new
DataGridViewCellStyle
{ SelectionForeColor = Color.Red },
992
new
DataGridViewCellStyle
{ SelectionForeColor = Color.Red },
997
new
DataGridViewCellStyle
{ SelectionForeColor = Color.Red },
998
new
DataGridViewCellStyle
{ SelectionForeColor = Color.Blue },
1003
new
DataGridViewCellStyle
{ Tag = "tag" },
1004
new
DataGridViewCellStyle
{ Tag = "tag" },
1009
new
DataGridViewCellStyle
{ Tag = "tag" },
1010
new
DataGridViewCellStyle
{ Tag = "other" },
1015
new
DataGridViewCellStyle
{ WrapMode = DataGridViewTriState.True },
1016
new
DataGridViewCellStyle
{ WrapMode = DataGridViewTriState.True },
1021
new
DataGridViewCellStyle
{ WrapMode = DataGridViewTriState.True },
1022
new
DataGridViewCellStyle
{ WrapMode = DataGridViewTriState.False },
1026
yield return new object[] { new
DataGridViewCellStyle
(), new(), false };
1027
yield return new object[] { new
DataGridViewCellStyle
(), null, false };
1044
yield return new object[] { new
DataGridViewCellStyle
(), "DataGridViewCellStyle { }" };
1047
new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomCenter },
1052
new
DataGridViewCellStyle
{ BackColor = Color.Red },
1057
new
DataGridViewCellStyle
{ DataSourceNullValue = "dbNull" },
1062
new
DataGridViewCellStyle
{ DataSourceNullValue = null },
1067
new
DataGridViewCellStyle
{ ForeColor = Color.Red },
1072
new
DataGridViewCellStyle
{ Font = SystemFonts.DefaultFont },
1077
new
DataGridViewCellStyle
{ Format = "format" },
1082
new
DataGridViewCellStyle
{ FormatProvider = new NumberFormatInfo() },
1087
new
DataGridViewCellStyle
{ NullValue = "null" },
1092
new
DataGridViewCellStyle
{ NullValue = null },
1097
new
DataGridViewCellStyle
{ Padding = new Padding(1, 2, 3, 4) },
1102
new
DataGridViewCellStyle
{ SelectionBackColor = Color.Red },
1107
new
DataGridViewCellStyle
{ SelectionForeColor = Color.Red },
1112
new
DataGridViewCellStyle
{ Tag = "tag" },
1117
new
DataGridViewCellStyle
{ WrapMode = DataGridViewTriState.True },
1124
new
DataGridViewCellStyle
System\Windows\Forms\DataGridViewCellTests.cs (81)
2242
yield return new object[] { null, new
DataGridViewCellStyle
() };
2244
DataGridViewCellStyle style =
new
() { Alignment = DataGridViewContentAlignment.BottomRight };
2269
DataGridViewCellStyle oldValue =
new
()
2309
DataGridViewCellStyle oldValue =
new
()
2352
DataGridViewCellStyle oldValue =
new
()
2400
DataGridViewCellStyle oldValue =
new
()
2446
DataGridViewCellStyle style1 =
new
()
2464
DataGridViewCellStyle style2 =
new
()
3323
Style = new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomLeft },
3356
Assert.Equal(new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomLeft }, cell.Style);
3393
Assert.Equal(new
DataGridViewCellStyle
(), cell.Style);
3660
yield return new object[] { new
DataGridViewCellStyle
(), -2 };
3661
yield return new object[] { new
DataGridViewCellStyle
(), -1 };
3662
yield return new object[] { new
DataGridViewCellStyle
(), 0 };
3663
yield return new object[] { new
DataGridViewCellStyle
(), 1 };
3812
yield return new object[] { new
DataGridViewCellStyle
(), -2 };
3813
yield return new object[] { new
DataGridViewCellStyle
(), -1 };
3814
yield return new object[] { new
DataGridViewCellStyle
(), 0 };
3815
yield return new object[] { new
DataGridViewCellStyle
(), 1 };
4138
yield return new object[] { "value", -2, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter(), DataGridViewDataErrorContexts.Formatting, null };
4139
yield return new object[] { "value", -1, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter(), DataGridViewDataErrorContexts.Formatting, null };
4140
yield return new object[] { "value", 0, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter(), DataGridViewDataErrorContexts.Formatting, null };
4701
Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new
DataGridViewCellStyle
(), -1, true));
4708
Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new
DataGridViewCellStyle
(), -1, true));
4717
Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new
DataGridViewCellStyle
(), -1, true));
4726
Assert.Throws<InvalidOperationException>(() => cell.GetInheritedStyle(new
DataGridViewCellStyle
(), -1, true));
4743
Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => cell.GetInheritedStyle(new
DataGridViewCellStyle
(), rowIndex, true));
5747
Style = new
DataGridViewCellStyle
()
6031
cell.PaintBorder(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle());
6038
Assert.Throws<ArgumentNullException>("graphics", () => cell.PaintBorder(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new
DataGridViewCellStyle
(), new DataGridViewAdvancedBorderStyle()));
6089
yield return new object[] { typeof(object), typeof(string), "value", new
DataGridViewCellStyle
(), null, null, "value" };
6090
yield return new object[] { typeof(string), typeof(string), "value", new
DataGridViewCellStyle
(), null, null, "value" };
6091
yield return new object[] { typeof(object), typeof(int), 1, new
DataGridViewCellStyle
(), null, null, 1 };
6092
yield return new object[] { typeof(int), typeof(int), 1, new
DataGridViewCellStyle
(), null, null, 1 };
6095
yield return new object[] { typeof(object), typeof(DBNull), DBNull.Value, new
DataGridViewCellStyle
(), null, null, null };
6096
yield return new object[] { typeof(string), typeof(string), "null", new
DataGridViewCellStyle
{ NullValue = "null" }, null, null, null };
6097
yield return new object[] { typeof(object), typeof(string), "null", new
DataGridViewCellStyle
{ NullValue = "null" }, null, null, null };
6098
yield return new object[] { typeof(object), typeof(string), "s", new
DataGridViewCellStyle
{ NullValue = "null" }, null, null, "s" };
6099
yield return new object[] { typeof(object), typeof(string), "longer", new
DataGridViewCellStyle
{ NullValue = "null" }, null, null, "longer" };
6100
yield return new object[] { typeof(object), typeof(string), "abcd", new
DataGridViewCellStyle
{ NullValue = "null" }, null, null, "abcd" };
6101
yield return new object[] { typeof(object), typeof(string), "null", new
DataGridViewCellStyle
{ NullValue = "null" }, null, null, null };
6102
yield return new object[] { typeof(int), typeof(int), 1, new
DataGridViewCellStyle
{ NullValue = 1 }, null, null, DBNull.Value };
6103
yield return new object[] { typeof(int), typeof(int), 2, new
DataGridViewCellStyle
{ NullValue = 1 }, null, null, 2 };
6104
yield return new object[] { typeof(string), typeof(string), "null", new
DataGridViewCellStyle
{ NullValue = "null", DataSourceNullValue = "dbNull" }, null, null, "dbNull" };
6105
yield return new object[] { typeof(int), typeof(int), 1, new
DataGridViewCellStyle
{ NullValue = 1, DataSourceNullValue = "dbNull" }, null, null, "dbNull" };
6108
yield return new object[] { typeof(string), typeof(int), 123, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter(), "123" };
6109
yield return new object[] { typeof(string), typeof(int), 123, new
DataGridViewCellStyle
(), new Int32Converter(), null, "123" };
6110
yield return new object[] { typeof(string), typeof(int), 123, new
DataGridViewCellStyle
(), null, new Int32Converter(), "123" };
6111
yield return new object[] { typeof(string), typeof(int?), 123, new
DataGridViewCellStyle
(), null, null, "123" };
6112
yield return new object[] { typeof(int), typeof(string), "123", new
DataGridViewCellStyle
(), null, null, 123 };
6113
yield return new object[] { typeof(int), typeof(string), "123", new
DataGridViewCellStyle
{ FormatProvider = CultureInfo.InvariantCulture }, null, null, 123 };
6114
yield return new object[] { typeof(int), typeof(string), "123", new
DataGridViewCellStyle
{ FormatProvider = new NumberFormatInfo() }, null, null, 123 };
6117
yield return new object[] { typeof(string), typeof(int), 123, new
DataGridViewCellStyle
(), new Int16Converter(), null, "123" };
6118
yield return new object[] { typeof(string), typeof(int), 123, new
DataGridViewCellStyle
(), null, new Int16Converter(), "123" };
6121
yield return new object[] { typeof(short), typeof(int), 123, new
DataGridViewCellStyle
(), null, null, (short)123 };
6122
yield return new object[] { typeof(short), typeof(int), 123, new
DataGridViewCellStyle
{ FormatProvider = CultureInfo.InvariantCulture }, null, null, (short)123 };
6123
yield return new object[] { typeof(short), typeof(int), 123, new
DataGridViewCellStyle
{ FormatProvider = new NumberFormatInfo() }, null, null, (short)123 };
6124
yield return new object[] { typeof(short?), typeof(int), 123, new
DataGridViewCellStyle
(), null, null, (short)123 };
6125
yield return new object[] { typeof(short), typeof(int?), 123, new
DataGridViewCellStyle
(), null, null, (short)123 };
6128
yield return new object[] { typeof(int?), typeof(int?), 123, new
DataGridViewCellStyle
(), null, null, 123 };
6129
yield return new object[] { typeof(int?), typeof(int), 123, new
DataGridViewCellStyle
(), null, null, 123 };
6130
yield return new object[] { typeof(int), typeof(int?), 123, new
DataGridViewCellStyle
(), null, null, 123 };
6131
yield return new object[] { typeof(string), typeof(int?), 123, new
DataGridViewCellStyle
(), null, null, "123" };
6134
yield return new object[] { typeof(bool), typeof(CheckState), CheckState.Indeterminate, new
DataGridViewCellStyle
(), null, null, DBNull.Value };
6135
yield return new object[] { typeof(bool), typeof(CheckState), CheckState.Checked, new
DataGridViewCellStyle
(), null, null, true };
6136
yield return new object[] { typeof(bool), typeof(CheckState), CheckState.Unchecked, new
DataGridViewCellStyle
(), null, null, false };
6137
yield return new object[] { typeof(bool), typeof(CheckState), CheckState.Unchecked - 1, new
DataGridViewCellStyle
(), null, null, false };
6138
yield return new object[] { typeof(bool), typeof(CheckState), CheckState.Indeterminate + 1, new
DataGridViewCellStyle
(), null, null, false };
6139
yield return new object[] { typeof(CheckState), typeof(CheckState), CheckState.Checked, new
DataGridViewCellStyle
(), null, null, CheckState.Checked };
6140
yield return new object[] { typeof(int), typeof(CheckState), CheckState.Checked, new
DataGridViewCellStyle
(), null, null, 1 };
6141
yield return new object[] { typeof(int), typeof(CheckState), CheckState.Checked, new
DataGridViewCellStyle
(), new EnumConverter(typeof(CheckState)), null, 1 };
6142
yield return new object[] { typeof(int), typeof(CheckState), CheckState.Checked, new
DataGridViewCellStyle
(), null, new EnumConverter(typeof(CheckState)), 1 };
6171
Assert.Throws<FormatException>(() => cell.ParseFormattedValue(1, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter()));
6178
Assert.Throws<FormatException>(() => cell.ParseFormattedValue(1, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter()));
6185
Assert.Throws<FormatException>(() => cell.ParseFormattedValue(1, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter()));
6190
yield return new object[] { typeof(DataGridViewCellTests), typeof(int), 123, new
DataGridViewCellStyle
(), null, null };
6191
yield return new object[] { typeof(DataGridViewCell), typeof(DataGridViewCellTests), new DataGridViewCellTests(), new
DataGridViewCellStyle
(), null, null };
6192
yield return new object[] { typeof(int), typeof(string), "Invalid", new
DataGridViewCellStyle
(), null, null };
6217
Assert.Throws<ArgumentException>("formattedValue", () => cell.ParseFormattedValue(formattedValue, new
DataGridViewCellStyle
(), new Int32Converter(), new Int32Converter()));
6231
Assert.Throws<InvalidOperationException>(() => cell.PositionEditingControl(true, true, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new
DataGridViewCellStyle
(), true, true, true, true));
6238
Assert.Throws<InvalidOperationException>(() => cell.PositionEditingPanel(new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), new
DataGridViewCellStyle
(), true, true, true, true));
System\Windows\Forms\DataGridViewColumnTests.cs (7)
740
yield return new object[] { null, new
DataGridViewCellStyle
() };
742
DataGridViewCellStyle style1 =
new
() { Alignment = DataGridViewContentAlignment.MiddleCenter };
743
DataGridViewCellStyle style2 =
new
() { Alignment = DataGridViewContentAlignment.BottomLeft };
769
DataGridViewCellStyle oldValue =
new
()
816
DataGridViewCellStyle oldValue =
new
()
861
DataGridViewCellStyle style1 =
new
()
879
DataGridViewCellStyle style2 =
new
()
System\Windows\Forms\DataGridViewEditingControlShowingEventArgsTests.cs (3)
13
yield return new object[] { null, new
DataGridViewCellStyle
() };
28
DataGridViewCellStyle cellStyle =
new
();
38
DataGridViewEditingControlShowingEventArgs e = new(button, new
DataGridViewCellStyle
());
System\Windows\Forms\DataGridViewHeaderCellTests.cs (6)
2025
Style = new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomLeft },
2058
Assert.Equal(new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomLeft }, cell.Style);
2095
Assert.Equal(new
DataGridViewCellStyle
(), cell.Style);
2111
Style = new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomLeft },
2144
Assert.Equal(new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.BottomLeft }, cell.Style);
2181
Assert.Equal(new
DataGridViewCellStyle
(), cell.Style);
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (17)
14
yield return new object[] { Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false };
15
yield return new object[] { new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), -1, DataGridViewElementStates.Displayed, "", new
DataGridViewCellStyle
(), true, false };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 0, (DataGridViewElementStates)7, "errorText", new
DataGridViewCellStyle
(), true, true };
44
Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewRowPostPaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false));
51
Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewRowPostPaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false));
77
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false)
91
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
104
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
115
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
128
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
139
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
152
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
163
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
176
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
187
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
200
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
213
DataGridViewRowPostPaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (19)
17
yield return new object[] { new DataGridView(), graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false };
18
yield return new object[] { new DataGridView(), graphics, new Rectangle(-1, -2, -3, -4), new Rectangle(-1, -2, -3, -4), -1, DataGridViewElementStates.Displayed, "", new
DataGridViewCellStyle
(), true, false };
19
yield return new object[] { new DataGridView(), graphics, new Rectangle(1, 2, 3, 4), new Rectangle(2, 3, 4, 5), 0, (DataGridViewElementStates)7, "errorText", new
DataGridViewCellStyle
(), true, true };
45
Assert.Throws<ArgumentNullException>("dataGridView", () => new DataGridViewRowPrePaintEventArgs(null, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false));
52
Assert.Throws<ArgumentNullException>("graphics", () => new DataGridViewRowPrePaintEventArgs(dataGridView, null, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false));
78
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false)
93
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false)
107
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, -2, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
118
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
131
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
142
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
155
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
166
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
179
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
190
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
203
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
214
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
227
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
240
DataGridViewRowPrePaintEventArgs e = new(dataGridView, graphics, Rectangle.Empty, Rectangle.Empty, rowIndex, DataGridViewElementStates.Displayed, null, new
DataGridViewCellStyle
(), false, false);
System\Windows\Forms\DataGridViewRowTests.cs (25)
390
yield return new object[] { null, new
DataGridViewCellStyle
() };
392
DataGridViewCellStyle style1 =
new
() { Alignment = DataGridViewContentAlignment.MiddleCenter };
393
DataGridViewCellStyle style2 =
new
() { Alignment = DataGridViewContentAlignment.BottomLeft };
419
DataGridViewCellStyle oldValue =
new
()
465
DataGridViewCellStyle oldValue =
new
()
508
DataGridViewCellStyle style1 =
new
()
526
DataGridViewCellStyle style2 =
new
()
570
Assert.Throws<InvalidOperationException>(() => row.DefaultCellStyle = new
DataGridViewCellStyle
());
2063
DataGridViewCellStyle complete1 =
new
()
2079
DataGridViewCellStyle complete2 =
new
()
2102
1, new
DataGridViewCellStyle
(), complete1, null, null,
2112
1, null, new
DataGridViewCellStyle
(), complete1, null,
2122
1, null, null, new
DataGridViewCellStyle
(), complete1,
2132
2, null, null, new
DataGridViewCellStyle
(), complete1,
3926
DataGridViewCellStyle style =
new
() { Alignment = DataGridViewContentAlignment.BottomRight };
3966
DataGridViewCellStyle style =
new
()
4009
DataGridViewCellStyle style =
new
()
4186
yield return new object[] { Rectangle.Empty, Rectangle.Empty, -1, DataGridViewElementStates.None, new
DataGridViewCellStyle
(), false };
4187
yield return new object[] { Rectangle.Empty, Rectangle.Empty, 0, DataGridViewElementStates.None, new
DataGridViewCellStyle
(), false };
4188
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new
DataGridViewCellStyle
{ BackColor = Color.Blue, SelectionBackColor = Color.Red }, true };
4189
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.Selected, new
DataGridViewCellStyle
{ BackColor = Color.Blue, SelectionBackColor = Color.Red }, true };
4190
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new
DataGridViewCellStyle
{ BackColor = Color.Blue, SelectionBackColor = Color.Red }, true };
4191
yield return new object[] { new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), 1, DataGridViewElementStates.None, new
DataGridViewCellStyle
{ BackColor = Color.Blue, SelectionBackColor = Color.Red }, false };
4217
Assert.Throws<InvalidOperationException>(() => row.DrawFocus(graphics, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, new
DataGridViewCellStyle
(), true));
4231
Assert.Throws<ArgumentNullException>("graphics", () => row.DrawFocus(null, new Rectangle(1, 2, 3, 4), new Rectangle(1, 2, 3, 4), -1, DataGridViewElementStates.None, new
DataGridViewCellStyle
(), true));
System\Windows\Forms\DataGridViewTests.cs (21)
794
yield return new object[] { new
DataGridViewCellStyle
() };
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 } };
799
yield return new object[] { new
DataGridViewCellStyle
{ Font = null } };
800
yield return new object[] { new
DataGridViewCellStyle
{ Alignment = DataGridViewContentAlignment.NotSet } };
801
yield return new object[] { new
DataGridViewCellStyle
{ WrapMode = DataGridViewTriState.NotSet } };
2332
DataGridViewCellStyle defaultCellStyle =
new
()
2350
ColumnHeadersDefaultCellStyle = new
DataGridViewCellStyle
{ Font = customFont2 },
2351
RowHeadersDefaultCellStyle = new
DataGridViewCellStyle
{ Font = customFont3 }
3049
_dataGridView.AlternatingRowsDefaultCellStyle =
new
() { BackColor = Color.AliceBlue };
3053
_dataGridView.AlternatingRowsDefaultCellStyle =
new
();
3169
_dataGridView.ColumnHeadersDefaultCellStyle =
new
() { BackColor = Color.Red };
3173
_dataGridView.ColumnHeadersDefaultCellStyle =
new
();
3229
_dataGridView.DefaultCellStyle =
new
() { BackColor = Color.Red };
3233
_dataGridView.DefaultCellStyle =
new
();
3349
_dataGridView.RowHeadersDefaultCellStyle =
new
();
3353
_dataGridView.RowHeadersDefaultCellStyle =
new
();
3369
_dataGridView.RowsDefaultCellStyle =
new
() { BackColor = Color.Red };
3373
_dataGridView.RowsDefaultCellStyle =
new
();
System\Windows\Forms\DataGridViewTests.Rendering.cs (3)
117
DataGridViewCellStyle defaultCellStyle =
new
()
135
ColumnHeadersDefaultCellStyle = new
DataGridViewCellStyle
{ Font = customColumnHeaderFont },
136
RowHeadersDefaultCellStyle = new
DataGridViewCellStyle
{ Font = customRowHeaderFont },
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (42)
548
yield return new object[] { new
DataGridViewCellStyle
(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false };
551
DataGridViewCellStyle customStyle =
new
()
559
DataGridViewCellStyle transparentStyle =
new
()
569
new
DataGridViewCellStyle
578
new
DataGridViewCellStyle
587
new
DataGridViewCellStyle
596
new
DataGridViewCellStyle
605
new
DataGridViewCellStyle
614
new
DataGridViewCellStyle
624
new
DataGridViewCellStyle
633
new
DataGridViewCellStyle
642
new
DataGridViewCellStyle
651
new
DataGridViewCellStyle
660
new
DataGridViewCellStyle
669
new
DataGridViewCellStyle
679
new
DataGridViewCellStyle
688
new
DataGridViewCellStyle
697
new
DataGridViewCellStyle
706
new
DataGridViewCellStyle
715
new
DataGridViewCellStyle
724
new
DataGridViewCellStyle
757
yield return new object[] { new
DataGridViewCellStyle
(), null, Color.FromArgb(0xFF, 0x00, 0x00, 0x00), Color.FromArgb(0xFF, 0x00, 0x00, 0x00), SystemColors.WindowText, false, HorizontalAlignment.Left, false };
760
DataGridViewCellStyle customStyle =
new
()
768
DataGridViewCellStyle transparentStyle =
new
()
778
new
DataGridViewCellStyle
787
new
DataGridViewCellStyle
796
new
DataGridViewCellStyle
805
new
DataGridViewCellStyle
814
new
DataGridViewCellStyle
823
new
DataGridViewCellStyle
833
new
DataGridViewCellStyle
842
new
DataGridViewCellStyle
851
new
DataGridViewCellStyle
860
new
DataGridViewCellStyle
869
new
DataGridViewCellStyle
878
new
DataGridViewCellStyle
888
new
DataGridViewCellStyle
897
new
DataGridViewCellStyle
906
new
DataGridViewCellStyle
915
new
DataGridViewCellStyle
924
new
DataGridViewCellStyle
933
new
DataGridViewCellStyle
WinFormsControlsTest (2)
DataGridViewTest.Designer.cs (2)
34
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 =
new
();
35
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 =
new
();
400 references to DataGridViewCellStyle
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (3)
832
private
DataGridViewCellStyle
_textCellStyle;
837
private
DataGridViewCellStyle
_boolCellStyle;
1003
DataGridViewCellStyle
cellStyle,
System.Windows.Forms (229)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (25)
265
private
DataGridViewCellStyle
? _placeholderCellStyle;
289
private
DataGridViewCellStyle
? _defaultCellStyle;
290
private
DataGridViewCellStyle
? _columnHeadersDefaultCellStyle;
291
private
DataGridViewCellStyle
? _rowHeadersDefaultCellStyle;
292
private
DataGridViewCellStyle
? _rowsDefaultCellStyle;
293
private
DataGridViewCellStyle
? _alternatingRowsDefaultCellStyle;
796
public
DataGridViewCellStyle
AlternatingRowsDefaultCellStyle
810
DataGridViewCellStyle
cs = AlternatingRowsDefaultCellStyle;
1508
public
DataGridViewCellStyle
ColumnHeadersDefaultCellStyle
1518
DataGridViewCellStyle
cs = ColumnHeadersDefaultCellStyle;
1535
private
DataGridViewCellStyle
DefaultColumnHeadersDefaultCellStyle
1539
DataGridViewCellStyle
defaultStyle = new DataGridViewCellStyle
1963
public
DataGridViewCellStyle
DefaultCellStyle
1980
DataGridViewCellStyle
defaultCellStyleTmp = new(_defaultCellStyle)
2031
DataGridViewCellStyle
cs = DefaultCellStyle;
2048
private
DataGridViewCellStyle
DefaultDefaultCellStyle
2052
DataGridViewCellStyle
defaultCellStyle = new DataGridViewCellStyle
2085
private
DataGridViewCellStyle
DefaultRowHeadersDefaultCellStyle
2089
DataGridViewCellStyle
defaultStyle = new DataGridViewCellStyle
2842
private
DataGridViewCellStyle
? InheritedEditingCellStyle
3048
internal
DataGridViewCellStyle
PlaceholderCellStyle => _placeholderCellStyle ??= new DataGridViewCellStyle();
3295
public
DataGridViewCellStyle
RowHeadersDefaultCellStyle
3305
DataGridViewCellStyle
cs = RowHeadersDefaultCellStyle;
3487
public
DataGridViewCellStyle
RowsDefaultCellStyle
3501
DataGridViewCellStyle
cs = RowsDefaultCellStyle;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (23)
2640
DataGridViewCellStyle
dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true);
2790
private void BuildInheritedColumnHeaderCellStyle(
DataGridViewCellStyle
inheritedCellStyle, DataGridViewCell cell)
2794
DataGridViewCellStyle
? cellStyle = null;
2801
DataGridViewCellStyle
columnHeadersStyle = ColumnHeadersDefaultCellStyle;
2804
DataGridViewCellStyle
dataGridViewStyle = DefaultCellStyle;
3242
DataGridViewCellStyle
dataGridViewCellStyle = dataGridViewCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true);
9682
private bool InitializeEditingCellValue(ref
DataGridViewCellStyle
dataGridViewCellStyle, ref DataGridViewCell dataGridViewCell)
9721
private bool InitializeEditingControlValue(ref
DataGridViewCellStyle
dataGridViewCellStyle, DataGridViewCell dataGridViewCell)
11793
DataGridViewCellStyle
cellStyle)
12743
DataGridViewCellStyle
? cellStyle)
12856
internal void OnCellStyleContentChanged(
DataGridViewCellStyle
dataGridViewCellStyle,
DataGridViewCellStyle
.DataGridViewCellStylePropertyInternal property)
12861
case
DataGridViewCellStyle
.DataGridViewCellStylePropertyInternal.Font:
12879
case
DataGridViewCellStyle
.DataGridViewCellStylePropertyInternal.ForeColor:
12890
changeAffectsPreferredSize: property is not
DataGridViewCellStyle
.DataGridViewCellStylePropertyInternal.Color
12891
and not
DataGridViewCellStyle
.DataGridViewCellStylePropertyInternal.ForeColor);
13092
DataGridViewCellStyle
dataGridViewCellStyle = currentCell.GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
19347
DataGridViewCellStyle
inheritedCellStyle = new();
19680
DataGridViewCellStyle
inheritedCellStyle = new();
25349
DataGridViewCellStyle
? cellStyle = InheritedEditingCellStyle;
25477
DataGridViewCellStyle
dataGridViewCellStyle = dataGridViewCurrentCell.GetInheritedStyle(inheritedCellStyle: null, _ptCurrentCell.Y, includeColors: true);
28134
DataGridViewCellStyle
defaultStyle = new();
28155
DataGridViewCellStyle
defaultStyle = new();
System\Windows\Forms\Controls\DataGridView\DataGridViewBand.cs (4)
81
public virtual
DataGridViewCellStyle
DefaultCellStyle
85
if (!Properties.TryGetValue(s_propDefaultCellStyle, out
DataGridViewCellStyle
? style))
96
DataGridViewCellStyle
? style = null;
335
public virtual
DataGridViewCellStyle
? InheritedStyle => null;
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
149
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
214
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
278
DataGridViewCellStyle
cellStyle,
605
DataGridViewCellStyle
cellStyle,
643
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (3)
19
DataGridViewCellStyle
defaultCellStyle = new DataGridViewCellStyle
48
public override
DataGridViewCellStyle
DefaultCellStyle
212
DataGridViewCellStyle
defaultCellStyle = DefaultCellStyle;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (41)
183
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, RowIndex, includeColors: false);
229
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, RowIndex, includeColors: false);
372
public
DataGridViewCellStyle
InheritedStyle
618
public
DataGridViewCellStyle
Style
622
if (!Properties.TryGetValue(s_propCellStyle, out
DataGridViewCellStyle
? dataGridViewCellStyle))
633
DataGridViewCellStyle
? dataGridViewCellStyle = null;
1307
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
1470
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
1476
protected virtual Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex) => Rectangle.Empty;
1483
ref
DataGridViewCellStyle
dataGridViewCellStyle,
1526
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
1532
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
1537
protected virtual Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex) => Rectangle.Empty;
1568
internal object? GetFormattedValue(int rowIndex, ref
DataGridViewCellStyle
cellStyle, DataGridViewDataErrorContexts context)
1589
ref
DataGridViewCellStyle
cellStyle,
1870
public virtual
DataGridViewCellStyle
GetInheritedStyle(
DataGridViewCellStyle
? inheritedCellStyle, int rowIndex, bool includeColors)
1887
DataGridViewCellStyle
inheritedCellStyleTmp;
1904
DataGridViewCellStyle
? cellStyle = null;
1911
DataGridViewCellStyle
? rowStyle = null;
1918
DataGridViewCellStyle
? columnStyle = null;
1925
DataGridViewCellStyle
dataGridViewStyle = DataGridView.DefaultCellStyle;
2276
internal
DataGridViewCellStyle
GetInheritedStyleInternal(int rowIndex) =>
2288
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
2300
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
2307
DataGridViewCellStyle
cellStyle,
2315
DataGridViewCellStyle
cellStyle,
2343
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
2461
public virtual void InitializeEditingControl(int rowIndex, object? initialFormattedValue,
DataGridViewCellStyle
dataGridViewCellStyle)
2732
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
2752
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
3077
DataGridViewCellStyle
cellStyle,
3092
DataGridViewCellStyle
cellStyle,
3124
DataGridViewCellStyle
cellStyle,
3560
DataGridViewCellStyle
cellStyle,
3593
DataGridViewCellStyle
cellStyle,
3636
DataGridViewCellStyle
cellStyle,
3698
DataGridViewCellStyle
cellStyle,
3713
DataGridViewCellStyle
cellStyle,
3752
DataGridViewCellStyle
cellStyle,
3786
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
236
DataGridViewCellStyle
dataGridViewCellStyle = _owner.InheritedStyle;
System\Windows\Forms\Controls\DataGridView\DataGridViewCellFormattingEventArgs.cs (2)
13
DataGridViewCellStyle
cellStyle)
24
public
DataGridViewCellStyle
CellStyle { get; set; }
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (3)
24
DataGridViewCellStyle
cellStyle,
74
public
DataGridViewCellStyle
? CellStyle { get; private set; }
181
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewCellParsingEventArgs.cs (2)
13
DataGridViewCellStyle
? inheritedCellStyle)
25
public
DataGridViewCellStyle
? InheritedCellStyle { get; set; }
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyle.cs (6)
31
/// Initializes a new instance of the <see cref="
DataGridViewCellStyle
"/> class.
39
public DataGridViewCellStyle(
DataGridViewCellStyle
dataGridViewCellStyle)
374
public virtual void ApplyStyle(
DataGridViewCellStyle
dataGridViewCellStyle)
444
public virtual
DataGridViewCellStyle
Clone() => new(this);
447
o is
DataGridViewCellStyle
dgvcs && GetDifferencesFrom(dgvcs) == DataGridViewCellStyleDifferences.None;
449
internal DataGridViewCellStyleDifferences GetDifferencesFrom(
DataGridViewCellStyle
dgvcs)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleContentChangedEventArgs.cs (2)
8
internal DataGridViewCellStyleContentChangedEventArgs(
DataGridViewCellStyle
dataGridViewCellStyle, bool changeAffectsPreferredSize)
14
public
DataGridViewCellStyle
CellStyle { get; }
System\Windows\Forms\Controls\DataGridView\DataGridViewCellStyleConverter.cs (1)
38
if (destinationType == typeof(InstanceDescriptor) && value is
DataGridViewCellStyle
)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
444
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
506
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
555
ref
DataGridViewCellStyle
cellStyle,
637
DataGridViewCellStyle
cellStyle,
1004
DataGridViewCellStyle
cellStyle,
1047
DataGridViewCellStyle
cellStyle,
1570
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (3)
20
DataGridViewCellStyle
defaultCellStyle = new DataGridViewCellStyle
51
public override
DataGridViewCellStyle
DefaultCellStyle
298
DataGridViewCellStyle
defaultCellStyle = DefaultCellStyle;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (6)
198
public override
DataGridViewCellStyle
DefaultCellStyle
211
DataGridViewCellStyle
defaultCellStyle = DefaultCellStyle;
425
public override
DataGridViewCellStyle
? InheritedStyle
429
DataGridViewCellStyle
? columnStyle = null;
441
DataGridViewCellStyle
inheritedCellStyleTmp = new();
442
DataGridViewCellStyle
dataGridViewStyle = DataGridView.DefaultCellStyle;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (10)
211
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
275
public override
DataGridViewCellStyle
GetInheritedStyle(
DataGridViewCellStyle
? inheritedCellStyle, int rowIndex, bool includeColors)
284
DataGridViewCellStyle
inheritedCellStyleTmp = inheritedCellStyle ?? new DataGridViewCellStyle();
286
DataGridViewCellStyle
? cellStyle = null;
293
DataGridViewCellStyle
columnHeadersStyle = DataGridView.ColumnHeadersDefaultCellStyle;
296
DataGridViewCellStyle
dataGridViewStyle = DataGridView.DefaultCellStyle;
478
DataGridViewCellStyle
cellStyle,
720
DataGridViewCellStyle
cellStyle,
750
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (12)
530
DataGridViewCellStyle
cellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
728
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
820
private int GetDropDownButtonHeight(Graphics graphics,
DataGridViewCellStyle
cellStyle)
831
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
896
ref
DataGridViewCellStyle
cellStyle,
1161
DataGridViewCellStyle
cellStyle,
1232
DataGridViewCellStyle
dataGridViewCellStyle = GetInheritedStyle(
1248
DataGridViewCellStyle
dataGridViewCellStyle)
1742
DataGridViewCellStyle
cellStyle = GetInheritedStyle(inheritedCellStyle: null, rowIndex, includeColors: false);
1818
DataGridViewCellStyle
cellStyle,
1860
DataGridViewCellStyle
cellStyle,
2375
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
71
public virtual void ApplyCellStyleToEditingControl(
DataGridViewCellStyle
dataGridViewCellStyle)
System\Windows\Forms\Controls\DataGridView\DataGridViewEditingControlShowingEventArgs.cs (3)
8
private
DataGridViewCellStyle
_cellStyle;
10
public DataGridViewEditingControlShowingEventArgs(Control control,
DataGridViewCellStyle
cellStyle)
18
public
DataGridViewCellStyle
CellStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (1)
523
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (7)
225
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
287
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
353
ref
DataGridViewCellStyle
cellStyle,
397
DataGridViewCellStyle
cellStyle,
573
DataGridViewCellStyle
cellStyle)
686
DataGridViewCellStyle
cellStyle,
724
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (3)
25
DataGridViewCellStyle
defaultCellStyle = new()
56
public override
DataGridViewCellStyle
DefaultCellStyle
274
DataGridViewCellStyle
defaultCellStyle = DefaultCellStyle;
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (5)
420
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
487
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
535
DataGridViewCellStyle
cellStyle,
841
DataGridViewCellStyle
cellStyle,
879
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (16)
91
public override
DataGridViewCellStyle
DefaultCellStyle
227
public override
DataGridViewCellStyle
InheritedStyle
236
DataGridViewCellStyle
inheritedRowStyle = new();
598
private void BuildInheritedRowHeaderCellStyle(
DataGridViewCellStyle
inheritedCellStyle)
602
DataGridViewCellStyle
? cellStyle = null;
609
DataGridViewCellStyle
rowHeadersStyle = DataGridView!.RowHeadersDefaultCellStyle;
612
DataGridViewCellStyle
dataGridViewStyle = DataGridView.DefaultCellStyle;
787
private void BuildInheritedRowStyle(int rowIndex,
DataGridViewCellStyle
inheritedRowStyle)
797
DataGridViewCellStyle
? rowStyle = null;
804
DataGridViewCellStyle
dataGridViewStyle = DataGridView.DefaultCellStyle;
807
DataGridViewCellStyle
rowsDefaultCellStyle = DataGridView.RowsDefaultCellStyle;
810
DataGridViewCellStyle
alternatingRowsDefaultCellStyle = DataGridView.AlternatingRowsDefaultCellStyle;
1180
DataGridViewCellStyle
cellStyle,
1427
DataGridViewCellStyle
inheritedRowStyle = new();
1511
DataGridViewCellStyle
inheritedCellStyle = new();
1712
DataGridViewCellStyle
inheritedCellStyle = new();
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (11)
183
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
242
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
305
public override
DataGridViewCellStyle
GetInheritedStyle(
DataGridViewCellStyle
? inheritedCellStyle, int rowIndex, bool includeColors)
309
DataGridViewCellStyle
inheritedCellStyleTmp = inheritedCellStyle ?? new DataGridViewCellStyle();
311
DataGridViewCellStyle
? cellStyle = null;
318
DataGridViewCellStyle
rowHeadersStyle = DataGridView.RowHeadersDefaultCellStyle;
321
DataGridViewCellStyle
dataGridViewStyle = DataGridView.DefaultCellStyle;
508
DataGridViewCellStyle
cellStyle,
582
DataGridViewCellStyle
cellStyle,
620
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (3)
20
DataGridViewCellStyle
inheritedRowStyle,
56
public
DataGridViewCellStyle
InheritedRowStyle { get; private set; }
175
DataGridViewCellStyle
inheritedRowStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (3)
22
DataGridViewCellStyle
inheritedRowStyle,
59
public
DataGridViewCellStyle
InheritedRowStyle { get; private set; }
192
DataGridViewCellStyle
inheritedRowStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (8)
137
private Rectangle GetAdjustedEditingControlBounds(Rectangle editingControlBounds,
DataGridViewCellStyle
cellStyle)
256
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
323
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
387
DataGridViewCellStyle
cellStyle,
505
public override void InitializeEditingControl(int rowIndex, object? initialFormattedValue,
DataGridViewCellStyle
dataGridViewCellStyle)
604
DataGridViewCellStyle
cellStyle,
647
DataGridViewCellStyle
cellStyle,
785
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (1)
94
public virtual void ApplyCellStyleToEditingControl(
DataGridViewCellStyle
dataGridViewCellStyle)
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (6)
26
protected override Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
83
protected override Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex)
134
protected override Size GetPreferredSize(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex, Size constraintSize)
174
DataGridViewCellStyle
cellStyle,
212
DataGridViewCellStyle
cellStyle,
360
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (4)
153
DataGridViewCellStyle
cellStyle,
308
DataGridViewCellStyle
cellStyle)
317
DataGridViewCellStyle
cellStyle,
353
DataGridViewCellStyle
cellStyle)
System\Windows\Forms\Controls\DataGridView\IDataGridViewEditingControl.cs (1)
43
void ApplyCellStyleToEditingControl(
DataGridViewCellStyle
dataGridViewCellStyle);
System.Windows.Forms.Design (8)
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (3)
29
private
DataGridViewCellStyle
? _cellStyle;
71
public
DataGridViewCellStyle
? CellStyle
91
DataGridViewCellStyle
cellStyleTmp = new(_cellStyle!);
System\Windows\Forms\Design\DataGridViewCellStyleEditor.cs (1)
33
if (value is
DataGridViewCellStyle
style)
System\Windows\Forms\Design\FormatStringDialog.cs (2)
17
private
DataGridViewCellStyle
? _dgvCellStyle;
40
public
DataGridViewCellStyle
DataGridViewCellStyle
System\Windows\Forms\Design\FormatStringEditor.cs (2)
23
DataGridViewCellStyle
? cellStyle = component as
DataGridViewCellStyle
;
System.Windows.Forms.Design.Tests (3)
EnsureEditorsTests.cs (1)
91
[InlineData(typeof(
DataGridViewCellStyle
), "Format", typeof(FormatStringEditor))]
System\Windows\Forms\Design\DataGridViewCellStyleBuilderTests.cs (1)
20
var
result = builder.CellStyle;
System\Windows\Forms\Design\FormatStringEditorTests.cs (1)
19
private readonly
DataGridViewCellStyle
_cellStyle;
System.Windows.Forms.Tests (155)
System\Windows\Forms\DataGridViewButtonColumnTests.cs (2)
149
DataGridViewCellStyle
style = _column.DefaultCellStyle;
152
DataGridViewCellStyle
newStyle = new DataGridViewCellStyle { Alignment = DataGridViewContentAlignment.BottomRight };
System\Windows\Forms\DataGridViewCellFormattingEventArgsTests.cs (2)
20
public void Ctor_Int_Int_Object_Type_DataGridViewCellStyle(int columnIndex, int rowIndex, object value, Type desiredType,
DataGridViewCellStyle
cellStyle)
51
public void CellStyle_Set_GetReturnsExpected(
DataGridViewCellStyle
value)
System\Windows\Forms\DataGridViewCellPaintingEventArgsTests.cs (1)
21
public void DataGridViewCellPaintingEventArgs_Ctor_Rectangle_Rectangle_Int_Int_DataGridViewElementStates_Object_Object_String_DataGridViewCellStyle_DataGridViewAdvancedBorderStyle_DataGridViewPaintParts(Rectangle clipBounds, Rectangle cellBounds, int rowIndex, int columnIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText,
DataGridViewCellStyle
cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
System\Windows\Forms\DataGridViewCellParsingEventArgsTests.cs (2)
21
public void Ctor_Int_Int_Object_Type_DataGridViewCellStyle(int rowIndex, int columnIndex, object value, Type desiredType,
DataGridViewCellStyle
inheritedCellStyle)
40
public void InheritedCellStyle_Set_GetReturnsExpected(
DataGridViewCellStyle
value)
System\Windows\Forms\DataGridViewCellStyleConverterTests.cs (1)
12
private readonly
DataGridViewCellStyle
_style;
System\Windows\Forms\DataGridViewCellStyleTests.cs (54)
18
DataGridViewCellStyle
style = new();
42
DataGridViewCellStyle
source = new()
58
DataGridViewCellStyle
style = new(source);
82
DataGridViewCellStyle
source = new();
83
DataGridViewCellStyle
style = new(source);
114
DataGridViewCellStyle
style = new()
129
DataGridViewCellStyle
style = new();
137
DataGridViewCellStyle
style = new()
151
DataGridViewCellStyle
style = new()
172
DataGridViewCellStyle
style = new()
189
DataGridViewCellStyle
style = new()
207
DataGridViewCellStyle
style = new()
225
DataGridViewCellStyle
style = new()
238
DataGridViewCellStyle
style = new()
250
DataGridViewCellStyle
style = new()
269
DataGridViewCellStyle
style = new()
283
DataGridViewCellStyle
style = new()
295
DataGridViewCellStyle
style = new()
309
DataGridViewCellStyle
style = new()
321
DataGridViewCellStyle
style = new()
336
DataGridViewCellStyle
style = new()
356
DataGridViewCellStyle
style = new()
372
DataGridViewCellStyle
style = new()
394
DataGridViewCellStyle
style = new()
411
DataGridViewCellStyle
style = new()
429
DataGridViewCellStyle
style = new()
447
DataGridViewCellStyle
style = new()
460
DataGridViewCellStyle
style = new()
472
DataGridViewCellStyle
style = new()
498
DataGridViewCellStyle
style = new()
513
DataGridViewCellStyle
style = new()
527
DataGridViewCellStyle
style = new()
539
DataGridViewCellStyle
style = new()
553
DataGridViewCellStyle
style = new()
565
DataGridViewCellStyle
style = new()
580
DataGridViewCellStyle
style = new()
596
DataGridViewCellStyle
style = new()
611
DataGridViewCellStyle
style = new();
619
DataGridViewCellStyle
source = new()
635
DataGridViewCellStyle
style = new();
661
DataGridViewCellStyle
source = new();
662
DataGridViewCellStyle
style = new()
702
DataGridViewCellStyle
style = new();
710
DataGridViewCellStyle
source = new()
726
DataGridViewCellStyle
style = source.Clone();
750
DataGridViewCellStyle
source = new();
751
DataGridViewCellStyle
style = source.Clone();
792
DataGridViewCellStyle
style = Assert.IsType<
DataGridViewCellStyle
>(source.Clone());
817
DataGridViewCellStyle
style = Assert.IsType<
DataGridViewCellStyle
>(source.Clone());
1032
public void DataGridViewCellStyle_Equals_Invoke_ReturnsExpected(
DataGridViewCellStyle
style, object other, bool expected, bool? expectedEqualHashCode = null)
1034
if (other is
DataGridViewCellStyle
)
1146
public void DataGridViewCellStyle_ToString_Invoke_ReturnsExpected(
DataGridViewCellStyle
style, string expected)
System\Windows\Forms\DataGridViewCellTests.cs (39)
2244
DataGridViewCellStyle
style = new() { Alignment = DataGridViewContentAlignment.BottomRight };
2250
public void DataGridViewCell_Style_Set_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2267
public void DataGridViewCell_Style_SetWithNonNullOldValue_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2269
DataGridViewCellStyle
oldValue = new()
2289
public void DataGridViewCell_Style_SetWithRow_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2307
public void DataGridViewCell_Style_SetWithNonNullOldValueWithRow_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2309
DataGridViewCellStyle
oldValue = new()
2332
public void DataGridViewCell_Style_SetWithColumn_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2350
public void DataGridViewCell_Style_SetWithNonNullOldValueWithColumn_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2352
DataGridViewCellStyle
oldValue = new()
2375
public void DataGridViewCell_Style_SetWithDataGridView_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2398
public void DataGridViewCell_Style_SetWithNonNullOldValueWithDataGridView_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
2400
DataGridViewCellStyle
oldValue = new()
2446
DataGridViewCellStyle
style1 = new()
2464
DataGridViewCellStyle
style2 = new()
3668
public void DataGridViewCell_GetContentBounds_InvokeWithoutGraphics_ReturnsExpected(
DataGridViewCellStyle
cellStyle, int rowIndex)
3676
public void DataGridViewCell_GetContentBounds_InvokeWithGraphics_ReturnsExpected(
DataGridViewCellStyle
cellStyle, int rowIndex)
3820
public void DataGridViewCell_GetErrorIconBounds_InvokeWithoutGraphics_ReturnsExpected(
DataGridViewCellStyle
cellStyle, int rowIndex)
3828
public void DataGridViewCell_GetErrorIconBounds_InvokeWithGraphics_ReturnsExpected(
DataGridViewCellStyle
cellStyle, int rowIndex)
4148
public void DataGridViewCell_GetFormattedValue_Invoke_ReturnsExpected(object value, int rowIndex,
DataGridViewCellStyle
cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context, object expected)
4156
public void DataGridViewCell_GetFormattedValue_InvokeWithRow_ReturnsExpected(object value, int rowIndex,
DataGridViewCellStyle
cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context, object expected)
4166
public void DataGridViewCell_GetFormattedValue_InvokeWithColumn_ReturnsExpected(object value, int rowIndex,
DataGridViewCellStyle
cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context, object expected)
6147
public void DataGridViewCell_ParseFormattedValue_Invoke_ReturnsExpected(Type valueType, Type formattedValueType, object formattedValue,
DataGridViewCellStyle
cellStyle, TypeConverter formattedValueTypeConverter, TypeConverter valueTypeConverter, object expected)
6197
public void DataGridViewCell_ParseFormattedValue_CantConvert_ThrowsFormatException(Type valueType, Type formattedValueType, object formattedValue,
DataGridViewCellStyle
cellStyle, TypeConverter formattedValueTypeConverter, TypeConverter valueTypeConverter)
6560
public new object GetFormattedValue(object value, int rowIndex, ref
DataGridViewCellStyle
cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context)
6602
public new Rectangle GetContentBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex) => base.GetContentBounds(graphics, cellStyle, rowIndex);
6604
public new Rectangle GetErrorIconBounds(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex) => base.GetErrorIconBounds(graphics, cellStyle, rowIndex);
6608
public new object GetFormattedValue(object value, int rowIndex, ref
DataGridViewCellStyle
cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context)
6613
public new Size GetPreferredSize(Graphics graphics,
DataGridViewCellStyle
cellStyle, int rowIndex, Size constraintSize) => base.GetPreferredSize(graphics, cellStyle, rowIndex, constraintSize);
6677
public new void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText,
DataGridViewCellStyle
cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
6682
public new void PaintBorder(Graphics graphics, Rectangle clipBounds, Rectangle bounds,
DataGridViewCellStyle
cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle)
System\Windows\Forms\DataGridViewColumnTests.cs (14)
742
DataGridViewCellStyle
style1 = new() { Alignment = DataGridViewContentAlignment.MiddleCenter };
743
DataGridViewCellStyle
style2 = new() { Alignment = DataGridViewContentAlignment.BottomLeft };
750
public void DataGridViewColumn_DefaultCellStyle_Set_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
767
public void DataGridViewColumn_DefaultCellStyle_SetWithNonNullOldValue_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
769
DataGridViewCellStyle
oldValue = new()
790
public void DataGridViewColumn_DefaultCellStyle_SetWithDataGridView_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
814
public void DataGridViewColumn_DefaultCellStyle_SetWithDataGridViewWithNonNullOldValue_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
816
DataGridViewCellStyle
oldValue = new()
861
DataGridViewCellStyle
style1 = new()
879
DataGridViewCellStyle
style2 = new()
System\Windows\Forms\DataGridViewEditingControlShowingEventArgsTests.cs (2)
19
public void DataGridViewEditingControlShowingEventArgs_NullArg_ThrowsArgumentNullException(Control control,
DataGridViewCellStyle
cellStyle)
28
DataGridViewCellStyle
cellStyle = new();
System\Windows\Forms\DataGridViewHeaderCellTests.cs (1)
4719
DataGridViewCellStyle
cellStyle,
System\Windows\Forms\DataGridViewRowPostPaintEventArgsTests.cs (1)
21
public void Ctor_DataGridView_Graphics_Rectangle_Rectangle_Int_DataGridViewElementStates_String_DataGridViewCellStyle_Bool_Bool(Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, string errorText,
DataGridViewCellStyle
inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow)
System\Windows\Forms\DataGridViewRowPrePaintEventArgsTests.cs (1)
24
public void Ctor_DataGridView_Graphics_Rectangle_Rectangle_Int_DataGridViewElementStates_String_DataGridViewCellStyle_Bool_Bool(DataGridView dataGridView, Graphics graphics, Rectangle clipBounds, Rectangle rowBounds, int rowIndex, DataGridViewElementStates rowState, string errorText,
DataGridViewCellStyle
inheritedRowStyle, bool isFirstDisplayedRow, bool isLastVisibleRow)
System\Windows\Forms\DataGridViewRowTests.cs (26)
392
DataGridViewCellStyle
style1 = new() { Alignment = DataGridViewContentAlignment.MiddleCenter };
393
DataGridViewCellStyle
style2 = new() { Alignment = DataGridViewContentAlignment.BottomLeft };
400
public void DataGridViewRow_DefaultCellStyle_Set_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
417
public void DataGridViewRow_DefaultCellStyle_SetWithNonNullOldValue_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
419
DataGridViewCellStyle
oldValue = new()
440
public void DataGridViewRow_DefaultCellStyle_SetWithDataGridView_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
463
public void DataGridViewRow_DefaultCellStyle_SetWithDataGridViewWithNonNullOldValue_GetReturnsExpected(
DataGridViewCellStyle
value,
DataGridViewCellStyle
expected)
465
DataGridViewCellStyle
oldValue = new()
508
DataGridViewCellStyle
style1 = new()
526
DataGridViewCellStyle
style2 = new()
2063
DataGridViewCellStyle
complete1 = new()
2079
DataGridViewCellStyle
complete2 = new()
2149
public void DataGridViewRow_InheritedStyle_Get_ReturnsExpected(int index,
DataGridViewCellStyle
rowDefaultCellStyle,
DataGridViewCellStyle
rowsDefaultCellStyle,
DataGridViewCellStyle
alternatingRowsDefaultCellStyle,
DataGridViewCellStyle
gridDefaultCellStyle,
DataGridViewCellStyle
expected)
3926
DataGridViewCellStyle
style = new() { Alignment = DataGridViewContentAlignment.BottomRight };
3966
DataGridViewCellStyle
style = new()
4009
DataGridViewCellStyle
style = new()
4196
public void DataGridViewRow_DrawFocus_Invoke_Success(Rectangle clipBounds, Rectangle bounds, int rowIndex, DataGridViewElementStates rowState,
DataGridViewCellStyle
cellStyle, bool cellsPaintSelectionBackground)
5772
public new void DrawFocus(Graphics graphics, Rectangle clipBounds, Rectangle bounds, int rowIndex, DataGridViewElementStates rowState,
DataGridViewCellStyle
cellStyle, bool cellsPaintSelectionBackground)
System\Windows\Forms\DataGridViewTests.cs (2)
806
public void DataGridView_DefaultCellStyle_returns_copy_if_not_all_fields_initialised(
DataGridViewCellStyle
cellStyle)
2332
DataGridViewCellStyle
defaultCellStyle = new()
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
117
DataGridViewCellStyle
defaultCellStyle = new()
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (6)
551
DataGridViewCellStyle
customStyle = new()
559
DataGridViewCellStyle
transparentStyle = new()
735
public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_Invoke_Success(
DataGridViewCellStyle
dataGridViewCellStyle, Font expectedFont, Color expectedBackColor, Color expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange)
760
DataGridViewCellStyle
customStyle = new()
768
DataGridViewCellStyle
transparentStyle = new()
944
public void DataGridViewTextBoxEditingDataGridViewTextBoxEditingControl_ApplyCellStyleToEditingDataGridViewTextBoxEditingControl_InvokeWithDataGridView_Success(
DataGridViewCellStyle
dataGridViewCellStyle, Font expectedFont, Color expectedBackColor, Color expectedEditingPanelBackColor, Color expectedForeColor, bool expectedWordWrap, HorizontalAlignment expectedTextAlign, bool expectedRepositionOnValueChange)
WinFormsControlsTest (2)
DataGridViewTest.Designer.cs (2)
34
System.Windows.Forms.
DataGridViewCellStyle
dataGridViewCellStyle1 = new();
35
System.Windows.Forms.
DataGridViewCellStyle
dataGridViewCellStyle3 = new();