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