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