Base:
property
DefaultCellStyle
System.Windows.Forms.DataGridViewBand.DefaultCellStyle
3 overrides of DefaultCellStyle
System.Windows.Forms (3)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
48
public override DataGridViewCellStyle
DefaultCellStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
51
public override DataGridViewCellStyle
DefaultCellStyle
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
56
public override DataGridViewCellStyle
DefaultCellStyle
21 writes to DefaultCellStyle
System.Windows.Forms (3)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
51
set => base.
DefaultCellStyle
= value;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
54
set => base.
DefaultCellStyle
= value;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
59
set => base.
DefaultCellStyle
= value;
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
346
destColumn.
DefaultCellStyle
= srcColumn.DefaultCellStyle;
System.Windows.Forms.Tests (17)
System\Windows\Forms\DataGridViewColumnTests.cs (17)
752
DefaultCellStyle
= value
758
column.
DefaultCellStyle
= value;
773
DefaultCellStyle
= oldValue
776
column.
DefaultCellStyle
= value;
781
column.
DefaultCellStyle
= value;
797
column.
DefaultCellStyle
= value;
804
column.
DefaultCellStyle
= value;
823
DefaultCellStyle
= oldValue
827
column.
DefaultCellStyle
= value;
833
column.
DefaultCellStyle
= value;
865
column.
DefaultCellStyle
= style1;
871
column.
DefaultCellStyle
= style1;
881
column.
DefaultCellStyle
= style2;
887
column.
DefaultCellStyle
= null;
893
column.
DefaultCellStyle
= null;
899
column.
DefaultCellStyle
= style2;
906
column.
DefaultCellStyle
= style1;
71 references to DefaultCellStyle
System.Windows.Forms (6)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonColumn.cs (1)
50
get => base.
DefaultCellStyle
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (1)
1921
columnStyle = OwningColumn.
DefaultCellStyle
;
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxColumn.cs (1)
53
get => base.
DefaultCellStyle
;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
211
DataGridViewCellStyle defaultCellStyle =
DefaultCellStyle
;
432
columnStyle =
DefaultCellStyle
;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
58
get => base.
DefaultCellStyle
;
System.Windows.Forms.Design (42)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (42)
346
destColumn.DefaultCellStyle = srcColumn.
DefaultCellStyle
;
370
if (defaultSrcColumn is null || defaultSrcColumn.
DefaultCellStyle
.Alignment != srcColumn.
DefaultCellStyle
.Alignment)
372
destColumn.
DefaultCellStyle
.Alignment = srcColumn.
DefaultCellStyle
.Alignment;
375
if (defaultSrcColumn is null || !defaultSrcColumn.
DefaultCellStyle
.BackColor.Equals(srcColumn.
DefaultCellStyle
.BackColor))
377
destColumn.
DefaultCellStyle
.BackColor = srcColumn.
DefaultCellStyle
.BackColor;
380
if (defaultSrcColumn is not null && srcColumn.
DefaultCellStyle
.Font is not null && !srcColumn.
DefaultCellStyle
.Font.Equals(defaultSrcColumn.
DefaultCellStyle
.Font))
382
destColumn.
DefaultCellStyle
.Font = srcColumn.
DefaultCellStyle
.Font;
385
if (defaultSrcColumn is null || !defaultSrcColumn.
DefaultCellStyle
.ForeColor.Equals(srcColumn.
DefaultCellStyle
.ForeColor))
387
destColumn.
DefaultCellStyle
.ForeColor = srcColumn.
DefaultCellStyle
.ForeColor;
390
if (defaultSrcColumn is null || !defaultSrcColumn.
DefaultCellStyle
.Format.Equals(srcColumn.
DefaultCellStyle
.Format))
392
destColumn.
DefaultCellStyle
.Format = srcColumn.
DefaultCellStyle
.Format;
395
if (defaultSrcColumn is null || defaultSrcColumn.
DefaultCellStyle
.Padding != srcColumn.
DefaultCellStyle
.Padding)
397
destColumn.
DefaultCellStyle
.Padding = srcColumn.
DefaultCellStyle
.Padding;
400
if (defaultSrcColumn is null || !defaultSrcColumn.
DefaultCellStyle
.SelectionBackColor.Equals(srcColumn.
DefaultCellStyle
.SelectionBackColor))
402
destColumn.
DefaultCellStyle
.SelectionBackColor = srcColumn.
DefaultCellStyle
.SelectionBackColor;
405
if (defaultSrcColumn is null || !defaultSrcColumn.
DefaultCellStyle
.SelectionForeColor.Equals(srcColumn.
DefaultCellStyle
.SelectionForeColor))
407
destColumn.
DefaultCellStyle
.SelectionForeColor = srcColumn.
DefaultCellStyle
.SelectionForeColor;
410
if (defaultSrcColumn is null || defaultSrcColumn.
DefaultCellStyle
.WrapMode != srcColumn.
DefaultCellStyle
.WrapMode)
412
destColumn.
DefaultCellStyle
.WrapMode = srcColumn.
DefaultCellStyle
.WrapMode;
417
if (!srcColumn.
DefaultCellStyle
.IsNullValueDefault)
419
object? srcNullValue = srcColumn.
DefaultCellStyle
.NullValue;
420
object? destNullValue = destColumn.
DefaultCellStyle
.NullValue;
424
destColumn.
DefaultCellStyle
.NullValue = srcNullValue;
System.Windows.Forms.Tests (23)
System\Windows\Forms\DataGridViewColumnTests.cs (23)
20
Assert.NotNull(column.
DefaultCellStyle
);
21
Assert.Same(column.
DefaultCellStyle
, column.
DefaultCellStyle
);
36
Assert.Same(column.
DefaultCellStyle
, column.InheritedStyle);
71
Assert.NotNull(column.
DefaultCellStyle
);
72
Assert.Same(column.
DefaultCellStyle
, column.
DefaultCellStyle
);
83
Assert.Same(column.
DefaultCellStyle
, column.InheritedStyle);
754
Assert.Equal(expected, column.
DefaultCellStyle
);
759
Assert.Equal(expected, column.
DefaultCellStyle
);
777
Assert.Equal(expected, column.
DefaultCellStyle
);
782
Assert.Equal(expected, column.
DefaultCellStyle
);
799
Assert.Equal(expected, column.
DefaultCellStyle
);
805
Assert.Equal(expected, column.
DefaultCellStyle
);
828
Assert.Equal(expected, column.
DefaultCellStyle
);
834
Assert.Equal(expected, column.
DefaultCellStyle
);
866
Assert.Equal(style1, column.
DefaultCellStyle
);
872
Assert.Equal(style1, column.
DefaultCellStyle
);
882
Assert.Same(style2, column.
DefaultCellStyle
);
888
Assert.NotNull(column.
DefaultCellStyle
);
894
Assert.NotNull(column.
DefaultCellStyle
);
900
Assert.NotNull(column.
DefaultCellStyle
);
907
Assert.Equal(style1, column.
DefaultCellStyle
);