228 references to DataGridViewRowHeadersWidthSizeMode
System.Windows.Forms (66)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (10)
316
private
DataGridViewRowHeadersWidthSizeMode
_rowHeadersWidthSizeMode;
444
_rowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
3381
if (RowHeadersWidthSizeMode is not
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
3382
and not
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)
3433
_rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing
3439
[DefaultValue(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)]
3443
public
DataGridViewRowHeadersWidthSizeMode
RowHeadersWidthSizeMode
3456
previousModeAutoSized: _rowHeadersWidthSizeMode is not
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
3457
and not
DataGridViewRowHeadersWidthSizeMode
.DisableResizing);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (50)
1971
public void AutoResizeRowHeadersWidth(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode)
1981
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode,
1985
if (rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)
1991
if (rowHeadersWidthSizeMode is <
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders or >
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)
1993
throw new InvalidEnumArgumentException(nameof(rowHeadersWidthSizeMode), (int)rowHeadersWidthSizeMode, typeof(
DataGridViewRowHeadersWidthSizeMode
));
2025
case
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader:
2038
case
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders:
2075
case
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders:
2113
public void AutoResizeRowHeadersWidth(int rowIndex,
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode)
2124
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode,
2131
if (rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)
2136
if (rowHeadersWidthSizeMode is <
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders or >
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)
2138
throw new InvalidEnumArgumentException(nameof(rowHeadersWidthSizeMode), (int)rowHeadersWidthSizeMode, typeof(
DataGridViewRowHeadersWidthSizeMode
));
2146
if (rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader
2153
if (rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders && rowIndex != -1)
2187
case
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader:
2200
case
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders:
2237
case
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders:
9318
if (RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)
9392
if (RowHeadersVisible && RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)
9471
if (RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)
9543
if (RowHeadersVisible && RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)
9560
&& RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)
10671
bool rowHeadersAutoSize = _rowHeadersWidthSizeMode is not
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
10672
and not
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
13457
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders,
13924
bool fixedRowHeadersWidth = _rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
13925
or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
15128
bool autoSizeRowHeaders = _rowHeadersWidthSizeMode is not
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
15129
and not
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
16065
Debug.Assert(_rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing);
16982
bool fixedRowHeadersWidth = _rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
16983
or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
17802
bool fixedRowHeadersWidth = _rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
17803
or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
17869
if (_rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders
17870
|| (_rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders && rowIndex != -1 && rowDisplayed)
17871
|| (_rowHeadersWidthSizeMode !=
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
17872
&& _rowHeadersWidthSizeMode !=
DataGridViewRowHeadersWidthSizeMode
.DisableResizing
17874
|| (_rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader
18198
bool autoSizeRowHeaders = _rowHeadersWidthSizeMode is not
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
18199
and not
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
18244
if (_rowHeadersWidthSizeMode is not
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
18245
and not
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)
18507
bool fixedRowHeadersWidth = _rowHeadersWidthSizeMode is
DataGridViewRowHeadersWidthSizeMode
.EnableResizing
18508
or
DataGridViewRowHeadersWidthSizeMode
.DisableResizing;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (4)
132
return (OwningRow.Resizable == DataGridViewTriState.True) || (DataGridView is not null && DataGridView.RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing);
143
return DataGridView is not null && (DataGridView.RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing || DataGridView.ColumnHeadersHeightSizeMode == DataGridViewColumnHeadersHeightSizeMode.EnableResizing);
245
if (OwningRow.GetResizable(rowIndex) == DataGridViewTriState.True || (DataGridView is not null && DataGridView.RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing))
286
if (DataGridView.RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing || DataGridView.ColumnHeadersHeightSizeMode == DataGridViewColumnHeadersHeightSizeMode.EnableResizing)
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (2)
1295
DataGridView.RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing ||
1296
DataGridView.RowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)
System.Windows.Forms.Tests (162)
System\Windows\Forms\DataGridViewHeaderCellTests.cs (16)
908
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in Enum.GetValues(typeof(
DataGridViewRowHeadersWidthSizeMode
)))
912
bool expected = rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
923
public void DataGridViewHeaderCell_Resizable_GetWithDataGridView_ReturnsExpected(DataGridViewColumnHeadersHeightSizeMode columnHeadersHeightSizeMode,
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewTriState rowResizable, DataGridViewTriState columnResizable, bool expected)
947
public void DataGridViewHeaderCell_Resizable_GetRowHeaderCellWithDataGridView_ReturnsExpected(DataGridViewColumnHeadersHeightSizeMode columnHeadersHeightSizeMode,
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewTriState rowResizable, DataGridViewTriState columnResizable, bool expected)
974
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in Enum.GetValues(typeof(
DataGridViewRowHeadersWidthSizeMode
)))
989
public void DataGridViewHeaderCell_Resizable_GetColumnHeaderCellWithDataGridView_ReturnsExpected(DataGridViewColumnHeadersHeightSizeMode columnHeadersHeightSizeMode,
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewTriState rowResizable, DataGridViewTriState columnResizable, bool expected)
1016
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in Enum.GetValues(typeof(
DataGridViewRowHeadersWidthSizeMode
)))
1020
bool expected = columnHeadersHeightSizeMode == DataGridViewColumnHeadersHeightSizeMode.EnableResizing || rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
1029
public void DataGridViewHeaderCell_Resizable_GetTopLeftHeaderCell_ReturnsExpected(DataGridViewColumnHeadersHeightSizeMode columnHeadersHeightSizeMode,
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool expected)
2682
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in Enum.GetValues(typeof(
DataGridViewRowHeadersWidthSizeMode
)))
2686
DataGridViewElementStates expected = rowHeadersWidthSizeMode ==
DataGridViewRowHeadersWidthSizeMode
.EnableResizing || columnHeadersHeightSizeMode == DataGridViewColumnHeadersHeightSizeMode.EnableResizing ? DataGridViewElementStates.Resizable : 0;
2697
public void DataGridViewHeaderCell_GetInheritedState_InvokeTopLeftHeaderCell_ReturnsExpected(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, DataGridViewColumnHeadersHeightSizeMode columnHeadersHeightSizeMode, bool columnHeadersVisible, DataGridViewElementStates expected)
System\Windows\Forms\DataGridViewTests.cs (146)
34
Assert.Equal(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, control.RowHeadersWidthSizeMode);
958
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader })
965
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.DisableResizing })
977
public void DataGridView_RowHeadersWidth_Set_GetReturnsExpected(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, bool autoSize, int value, int expectedValue)
1004
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader })
1014
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.DisableResizing })
1028
public void DataGridView_RowHeadersWidth_SetWithParent_GetReturnsExpected(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, bool autoSize, int value, int expectedValue, int expectedLayoutCallCount, int expectedParentLayoutCallCount)
1074
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader })
1092
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.DisableResizing })
1106
public void DataGridView_RowHeadersWidth_SetWithHandle_GetReturnsExpected(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, bool autoSize, int value, int expectedValue)
1143
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader })
1161
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in new
DataGridViewRowHeadersWidthSizeMode
[] {
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.DisableResizing })
1175
public void DataGridView_RowHeadersWidth_SetWithParentWithHandle_GetReturnsExpected(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, bool autoSize, int value, int expectedValue, int expectedLayoutCallCount, int expectedParentLayoutCallCount)
1231
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, 1)]
1232
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, 1)]
1233
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, 0)]
1234
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, 0)]
1235
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, 0)]
1236
public void DataGridView_RowHeadersWidth_SetWithHandler_CallsRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, int expectedCallCount)
1274
[EnumData<
DataGridViewRowHeadersWidthSizeMode
>]
1275
public void DataGridView_RowHeadersWidth_SetWithHandlerDisposed_DoesNotCallRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode)
1310
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, 1)]
1311
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, 1)]
1312
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, 0)]
1313
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, 0)]
1314
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, 0)]
1315
public void DataGridView_RowHeadersWidth_SetWithHandlerInDisposing_CallsRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, int expectedCallCount)
1364
[EnumData<
DataGridViewRowHeadersWidthSizeMode
>]
1365
public void DataGridView_RowHeadersWidth_SetWithHandlerInColumnDisposing_DoesNotCallRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode)
1426
foreach (
DataGridViewRowHeadersWidthSizeMode
value in Enum.GetValues(typeof(
DataGridViewRowHeadersWidthSizeMode
)))
1435
public void DataGridView_RowHeadersWidthSizeMode_Set_GetReturnsExpected(bool rowHeadersVisible,
DataGridViewRowHeadersWidthSizeMode
value)
1455
yield return new object[] { true,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, 21 };
1456
yield return new object[] { true,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, 21 };
1457
yield return new object[] { true,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, 21 };
1458
yield return new object[] { true,
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, DefaultRowHeadersWidth };
1459
yield return new object[] { true,
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, DefaultRowHeadersWidth };
1460
yield return new object[] { false,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, DefaultRowHeadersWidth };
1461
yield return new object[] { false,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, DefaultRowHeadersWidth };
1462
yield return new object[] { false,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, DefaultRowHeadersWidth };
1463
yield return new object[] { false,
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, DefaultRowHeadersWidth };
1464
yield return new object[] { false,
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, DefaultRowHeadersWidth };
1469
public void DataGridView_RowHeadersWidthSizeMode_SetWithHandle_GetReturnsExpected(bool rowHeadersVisible,
DataGridViewRowHeadersWidthSizeMode
value, int expectedRowHeadersWidth)
1500
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders)]
1501
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders)]
1502
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)]
1503
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders)]
1504
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders)]
1505
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing,
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)]
1506
public void DataGridView_RowHeadersWidthSizeMode_SetNonResizeThenResize_RestoresOldValue(
DataGridViewRowHeadersWidthSizeMode
originalRowHeadersWidthSizeMode,
DataGridViewRowHeadersWidthSizeMode
value)
1541
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, false)]
1542
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, true)]
1543
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, true)]
1544
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, true)]
1545
public void DataGridView_RowHeadersWidthSizeMode_SetWithHandler_CallsRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
value, object expectedPreviousModeAutoSized)
1570
control.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
1571
Assert.Equal(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, control.RowHeadersWidthSizeMode);
1582
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)]
1583
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders)]
1584
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders)]
1585
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)]
1586
public void DataGridView_RowHeadersWidthSizeMode_SetWithHandlerDisposed_DoesNotCallRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
value)
1605
control.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
1606
Assert.Equal(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, control.RowHeadersWidthSizeMode);
1617
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)]
1618
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders)]
1619
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders)]
1620
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)]
1621
public void DataGridView_RowHeadersWidthSizeMode_SetWithHandlerInDisposing_DoesNotCallRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
value)
1648
control.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
1649
Assert.Equal(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, control.RowHeadersWidthSizeMode);
1673
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)]
1674
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders)]
1675
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders)]
1676
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader)]
1677
public void DataGridView_RowHeadersWidthSizeMode_SetWithHandlerInColumnDisposing_DoesNotCallRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
value)
1704
control.RowHeadersWidthSizeMode =
DataGridViewRowHeadersWidthSizeMode
.EnableResizing;
1705
Assert.Equal(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, control.RowHeadersWidthSizeMode);
1721
[InvalidEnumData<
DataGridViewRowHeadersWidthSizeMode
>]
1722
public void DataGridView_RowHeadersWidthSizeMode_SetInvalidValue_ThrowsInvalidEnumArgumentException(
DataGridViewRowHeadersWidthSizeMode
value)
2389
foreach (
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode in Enum.GetValues(typeof(
DataGridViewRowHeadersWidthSizeMode
)))
2401
public void DataGridView_OnRowHeadersWidthChanged_Invoke_CallsRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, EventArgs eventArgs)
2431
public void DataGridView_OnRowHeadersWidthChanged_InvokeWithHandle_CallsRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, EventArgs eventArgs)
2472
public void DataGridView_OnRowHeadersWidthChanged_InvokeDisposed_DoesNotCallRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, EventArgs eventArgs)
2498
public void DataGridView_OnRowHeadersWidthChanged_InvokeInDisposing_CallsRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, EventArgs eventArgs)
2538
public void DataGridView_OnRowHeadersWidthChanged_InvokeInColumnDisposing_DoesNotCallRowHeadersWidthChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, bool rowHeadersVisible, EventArgs eventArgs)
2576
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, new DataGridViewAutoSizeModeEventArgs(true) };
2577
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, new DataGridViewAutoSizeModeEventArgs(false) };
2578
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, new DataGridViewAutoSizeModeEventArgs(true) };
2579
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, new DataGridViewAutoSizeModeEventArgs(false) };
2580
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, new DataGridViewAutoSizeModeEventArgs(true) };
2581
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, new DataGridViewAutoSizeModeEventArgs(false) };
2582
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, new DataGridViewAutoSizeModeEventArgs(false) };
2583
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, new DataGridViewAutoSizeModeEventArgs(false) };
2588
public void DataGridView_OnRowHeadersWidthSizeModeChanged_Invoke_CallsRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewAutoSizeModeEventArgs eventArgs)
2619
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, new DataGridViewAutoSizeModeEventArgs(true), 21 };
2620
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToAllHeaders, new DataGridViewAutoSizeModeEventArgs(false), 21 };
2621
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, new DataGridViewAutoSizeModeEventArgs(true), 21 };
2622
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToDisplayedHeaders, new DataGridViewAutoSizeModeEventArgs(false), 21 };
2623
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, new DataGridViewAutoSizeModeEventArgs(true), 21 };
2624
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.AutoSizeToFirstHeader, new DataGridViewAutoSizeModeEventArgs(false), 21 };
2625
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.DisableResizing, new DataGridViewAutoSizeModeEventArgs(false), DefaultRowHeadersWidth };
2626
yield return new object[] {
DataGridViewRowHeadersWidthSizeMode
.EnableResizing, new DataGridViewAutoSizeModeEventArgs(false), DefaultRowHeadersWidth };
2631
public void DataGridView_OnRowHeadersWidthSizeModeChanged_InvokeWithHandle_CallsRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewAutoSizeModeEventArgs eventArgs, int expectedRowHeadersWidth)
2672
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.EnableResizing)]
2673
[InlineData(
DataGridViewRowHeadersWidthSizeMode
.DisableResizing)]
2674
public void DataGridView_OnRowHeadersWidthSizeModeChanged_InvalidEnableDisableResizingPreviousAutoModeSize_ThrowsArgumentOutOfRangeException(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode)
2686
public void DataGridView_OnRowHeadersWidthSizeModeChanged_InvokeDisposed_DoesNotCallRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewAutoSizeModeEventArgs eventArgs)
2713
public void DataGridView_OnRowHeadersWidthSizeModeChanged_InvokeInDisposing_CallsRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewAutoSizeModeEventArgs eventArgs)
2752
public void DataGridView_OnRowHeadersWidthSizeModeChanged_InvokeInColumnDisposing_DoesNotCallRowHeadersWidthSizeModeChanged(
DataGridViewRowHeadersWidthSizeMode
rowHeadersWidthSizeMode, DataGridViewAutoSizeModeEventArgs eventArgs)