356 references to SizeType
PresentationUI (21)
MS\Internal\Documents\Application\DocumentPropertiesDialog.Designer.cs (8)
125
this.tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 20F));
162
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 94));
163
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 335));
535
this._documentTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 103));
536
this._documentTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 283));
555
this._documentTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 20F));
658
this._fileTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 103));
659
this._fileTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 283));
MS\Internal\Documents\CredentialManagerDialog.Designer.cs (3)
59
this._mainDialogTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
101
this._userInputtableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 100F));
108
this._userInputtableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
MS\Internal\Documents\RMEnrollmentPage2.Designer.cs (4)
149
this._tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 71.5164F));
150
this._tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 28.48361F));
160
this._tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 10F));
162
this._tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 10F));
MS\Internal\Documents\RMEnrollmentPage3.Designer.cs (5)
50
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
59
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 20F));
86
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
93
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
94
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
MS\Internal\Documents\SigningDialog.Designer.cs (1)
73
_signatureControlInputLayoutTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
System.Windows.Forms (57)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (4)
196
_buttonTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
220
_pictureLabelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
223
_pictureLabelTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.AutoSize));
245
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 20F));
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (8)
492
colStyle.SizeType = (spring) ?
SizeType
.Percent :
SizeType
.AutoSize;
503
TableLayoutSettings.RowStyles[0].SizeType =
SizeType
.Absolute;
510
TableLayoutSettings.ColumnStyles[i].SizeType =
SizeType
.AutoSize;
539
rowStyle.SizeType = (spring) ?
SizeType
.Percent :
SizeType
.AutoSize;
551
TableLayoutSettings.ColumnStyles[0].SizeType =
SizeType
.Absolute;
559
TableLayoutSettings.RowStyles[i].SizeType =
SizeType
.AutoSize;
System\Windows\Forms\Layout\TableLayout.ContainerInfo.cs (1)
343
if (style.SizeType ==
SizeType
.Percent)
System\Windows\Forms\Layout\TableLayout.cs (21)
159
if (containerInfo.MaxColumns == 1 && containerInfo.ColumnStyles.Count > 0 && containerInfo.ColumnStyles[0].SizeType ==
SizeType
.Absolute)
659
if (style is not null && style.SizeType ==
SizeType
.Absolute)
768
if (style.SizeType ==
SizeType
.Percent)
787
if (style.SizeType ==
SizeType
.Percent)
929
if (lastPercent < styles.Count && styles[lastPercent].SizeType ==
SizeType
.Percent)
1003
(index < styles.Count) && styles[index].SizeType ==
SizeType
.Absolute;
1033
case
SizeType
.Absolute:
1038
case
SizeType
.Percent:
1096
SizeType
sizeType = i < styles.Count ? styles[i].SizeType :
SizeType
.AutoSize;
1097
if (sizeType ==
SizeType
.Percent)
1120
SizeType
sizeType = i < styles.Count ? styles[i].SizeType :
SizeType
.AutoSize;
1129
if (sizeType ==
SizeType
.Percent)
1154
SizeType
sizeType = i < styles.Count ? styles[i].SizeType :
SizeType
.AutoSize;
1155
if (sizeType ==
SizeType
.AutoSize)
1490
Debug.Assert(containerInfo.ColumnStyles[k].SizeType ==
SizeType
.Absolute, $"column {k} is not absolutely sized");
1495
Debug.Assert(containerInfo.ColumnStyles[k].SizeType ==
SizeType
.Absolute, $"column {k} is not absolutely sized");
1507
Debug.Assert(containerInfo.RowStyles[k].SizeType ==
SizeType
.Absolute, $"column {k} is not absolutely sized");
1512
Debug.Assert(containerInfo.RowStyles[k].SizeType ==
SizeType
.Absolute, $"column {k} is not absolutely sized");
System\Windows\Forms\MDI\MDIWindowDialog.cs (2)
125
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
126
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
System\Windows\Forms\Panels\TableLayoutPanel\ColumnStyle.cs (2)
12
public ColumnStyle(
SizeType
sizeType)
17
public ColumnStyle(
SizeType
sizeType, float width)
System\Windows\Forms\Panels\TableLayoutPanel\RowStyle.cs (2)
12
public RowStyle(
SizeType
sizeType)
17
public RowStyle(
SizeType
sizeType, float height)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (2)
523
if (cs.SizeType ==
SizeType
.Absolute)
544
if (rs.SizeType ==
SizeType
.Absolute)
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettings.StyleConverter.cs (4)
30
case
SizeType
.AutoSize:
34
case
SizeType
.Absolute:
35
case
SizeType
.Percent:
37
style.GetTypeWithConstructor().GetConstructor([typeof(
SizeType
), typeof(int)]),
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutSettingsTypeConverter.cs (3)
175
Type sizeTypeType = typeof(
SizeType
);
197
SizeType
type = (
SizeType
)Enum.Parse(sizeTypeType, styleString.AsSpan(currentIndex, nextIndex - currentIndex), true);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutStyle.cs (5)
14
private
SizeType
_sizeType =
SizeType
.AutoSize;
17
[DefaultValue(
SizeType
.AutoSize)]
18
public
SizeType
SizeType
62
return SizeType !=
SizeType
.AutoSize;
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.StatusDialog.cs (3)
66
_tableLayoutPanel.ColumnStyles.Add(new(
SizeType
.Percent, 100F));
67
_tableLayoutPanel.RowStyles.Add(new(
SizeType
.Percent, 50F));
68
_tableLayoutPanel.RowStyles.Add(new(
SizeType
.Percent, 50F));
System.Windows.Forms.Design (130)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (9)
213
_radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 25F));
214
_radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 25F));
215
_radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 25F));
216
_radioButtonsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 25F));
258
_okSaveTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
259
_okSaveTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
264
_okSaveTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));
269
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
274
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 100F));
System\ComponentModel\Design\ByteViewer.cs (2)
63
ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
66
RowStyles.Add(new RowStyle(
SizeType
.Percent, 100F));
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (8)
213
if (_styles[i].SizeType !=
SizeType
.AutoSize && widths[i] >= DesignerUtils.s_minimumSizeDrag)
226
if (_styles[i].SizeType !=
SizeType
.AutoSize && widths[i] >= DesignerUtils.s_minimumSizeDrag)
280
if (_styles[rightIndex].SizeType ==
SizeType
.Absolute &&
281
_styles[leftIndex].SizeType ==
SizeType
.Absolute)
307
else if (_styles[rightIndex].SizeType ==
SizeType
.Percent &&
308
_styles[leftIndex].SizeType ==
SizeType
.Percent)
312
if (_styles[i].SizeType ==
SizeType
.Percent)
330
int absIndex = _styles[rightIndex].SizeType ==
SizeType
.Absolute ? rightIndex : leftIndex;
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (13)
297
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 14F));
299
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 250F));
314
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 22F));
315
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 16F));
316
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 91F));
317
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 12F));
318
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 22F));
320
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 4F));
322
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 4F));
324
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 27F));
364
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
365
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
370
_okCancelTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (9)
151
_sampleViewTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 423F));
159
_sampleViewGridsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 10F));
160
_sampleViewGridsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 30F));
161
_sampleViewGridsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 20F));
162
_sampleViewGridsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 30F));
163
_sampleViewGridsTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 10F));
213
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
214
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
233
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 100F));
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (8)
534
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent));
546
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));
552
_addRemoveTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
553
_addRemoveTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
558
_addRemoveTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));
584
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
585
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
586
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 20F));
System\Windows\Forms\Design\LinkAreaEditor.LinkAreaUI.cs (2)
88
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
89
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
System\Windows\Forms\Design\MaskDesignerDialog.cs (5)
215
_maskTryItTable.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
248
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
256
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));
263
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
264
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (6)
145
_outerPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 20F));
146
_outerPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 24F));
177
_innerPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.AutoSize));
178
_innerPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.AutoSize));
184
_innerPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 20F));
185
_innerPanel.RowStyles.Add(new RowStyle(
SizeType
.AutoSize));
System\Windows\Forms\Design\StyleEditorForm.cs (35)
198
_addRemoveInsertTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 33F));
199
_addRemoveInsertTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 33F));
200
_addRemoveInsertTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 33F));
235
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
236
_okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
262
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
263
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.AutoSize));
273
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));
280
_showTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
332
_helperTextTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
382
_sizeTypeTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 33.3F));
383
_sizeTypeTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 33.3F));
384
_sizeTypeTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 33.3F));
554
private static string FormatValueString(
SizeType
type, float value)
556
if (type ==
SizeType
.Absolute)
560
else if (type ==
SizeType
.Percent)
674
SizeType
type;
755
private void UpdateGroupBox(
SizeType
type, float value)
759
case
SizeType
.Absolute:
774
case
SizeType
.Percent:
789
case
SizeType
.AutoSize:
828
member,
SizeType
.Absolute.ToString(),
902
private void UpdateTypeAndValue(
SizeType
type, float value)
926
UpdateTypeAndValue(
SizeType
.Absolute, (float)_absoluteNumericUpDown.Value);
934
UpdateTypeAndValue(
SizeType
.Percent, (float)_percentNumericUpDown.Value);
942
UpdateTypeAndValue(
SizeType
.AutoSize, 0);
952
UpdateTypeAndValue(
SizeType
.Absolute, (float)_absoluteNumericUpDown.Value);
957
UpdateTypeAndValue(
SizeType
.Percent, (float)_percentNumericUpDown.Value);
971
if (_tableLayoutPanel.RowStyles[i].SizeType !=
SizeType
.Percent)
980
if (_tableLayoutPanel.ColumnStyles[i].SizeType !=
SizeType
.Percent)
999
if (_tableLayoutPanel.RowStyles[i].SizeType !=
SizeType
.Percent)
1008
if (_tableLayoutPanel.ColumnStyles[i].SizeType !=
SizeType
.Percent)
1035
UpdateTypeAndValue(
SizeType
.Absolute, (float)_absoluteNumericUpDown.Value);
1039
UpdateTypeAndValue(
SizeType
.Percent, (float)_percentNumericUpDown.Value);
1043
UpdateTypeAndValue(
SizeType
.AutoSize, 0);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (21)
654
Table.ColumnStyles[0].SizeType =
SizeType
.Percent;
656
Table.ColumnStyles[1].SizeType =
SizeType
.Percent;
660
Table.RowStyles[0].SizeType =
SizeType
.Percent;
662
Table.RowStyles[1].SizeType =
SizeType
.Percent;
918
Table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, DesignerUtils.s_minimumStyleSize));
931
Table.RowStyles.Add(new RowStyle(
SizeType
.Absolute, DesignerUtils.s_minimumStyleSize));
1595
case
SizeType
.Absolute:
1598
case
SizeType
.Percent:
1601
case
SizeType
.AutoSize:
1667
Table.RowStyles.Insert(index, new RowStyle(
SizeType
.Absolute, DesignerUtils.s_minimumStyleSize));
1679
Table.ColumnStyles.Insert(index, new ColumnStyle(
SizeType
.Absolute, DesignerUtils.s_minimumStyleSize));
1932
private void ChangeSizeType(bool isRow,
SizeType
newType)
1970
case
SizeType
.Absolute:
1971
styles[index].SizeType =
SizeType
.Absolute;
1982
case
SizeType
.Percent:
1983
styles[index].SizeType =
SizeType
.Percent;
1994
case
SizeType
.AutoSize:
1995
styles[index].SizeType =
SizeType
.AutoSize;
2027
private void OnAbsoluteClick(object sender, EventArgs e) => ChangeSizeType((bool)((ToolStripMenuItem)sender).Tag,
SizeType
.Absolute);
2029
private void OnPercentClick(object sender, EventArgs e) => ChangeSizeType((bool)((ToolStripMenuItem)sender).Tag,
SizeType
.Percent);
2031
private void OnAutoSizeClick(object sender, EventArgs e) => ChangeSizeType((bool)((ToolStripMenuItem)sender).Tag,
SizeType
.AutoSize);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (6)
212
_tableLayoutPanel.ColumnStyles.Add(new(
SizeType
.Absolute, 274F));
214
_tableLayoutPanel.ColumnStyles.Add(new(
SizeType
.Percent, 100F));
231
_tableLayoutPanel.RowStyles.Add(new(
SizeType
.Percent, 100F));
235
_addTableLayoutPanel.ColumnStyles.Add(new(
SizeType
.Percent, 100F));
258
_okCancelTableLayoutPanel.ColumnStyles.Add(new(
SizeType
.Percent, 50F));
259
_okCancelTableLayoutPanel.ColumnStyles.Add(new(
SizeType
.Percent, 50F));
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (6)
233
_okCancelPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
234
_okCancelPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
252
_nodeControlPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
253
_nodeControlPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
308
_overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 100F));
312
_overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Percent, 100F));
System.Windows.Forms.Design.Tests (2)
System\ComponentModel\Design\ByteViewerTests.cs (2)
49
Assert.Equal(
SizeType
.Percent, columnStyle.SizeType);
113
Assert.Equal(
SizeType
.Percent, rowStyle.SizeType);
System.Windows.Forms.Tests (113)
SerializableTypesTests.cs (9)
281
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50));
282
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50));
283
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50));
284
tableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 20));
285
tableLayoutPanel.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 30));
319
Assert.Equal(
SizeType
.Percent, result.ColumnStyles[0].SizeType);
320
Assert.Equal(
SizeType
.Percent, result.ColumnStyles[1].SizeType);
321
Assert.Equal(
SizeType
.Percent, result.ColumnStyles[2].SizeType);
322
Assert.Equal(
SizeType
.Absolute, result.RowStyles[0].SizeType);
System\Windows\Forms\ColumnStyleTests.cs (11)
14
Assert.Equal(
SizeType
.AutoSize, style.SizeType);
19
[EnumData<
SizeType
>]
20
[InvalidEnumData<
SizeType
>]
21
public void ColumnStyle_Ctor_SizeType(
SizeType
sizeType)
29
[InlineData(
SizeType
.AutoSize, 0)]
30
[InlineData(
SizeType
.Absolute, 1)]
31
[InlineData(
SizeType
.Percent, 2)]
32
[InlineData((
SizeType
.AutoSize - 1), 3)]
33
[InlineData((
SizeType
.Percent + 1), 4)]
34
public void ColumnStyle_Ctor_SizeType_Float(
SizeType
sizeType, float width)
44
Assert.Throws<ArgumentOutOfRangeException>("value", () => new ColumnStyle(
SizeType
.AutoSize, -1));
System\Windows\Forms\ControlTests.cs (3)
868
table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
869
table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
870
table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (6)
1673
ColumnStyle columnStyle = new(
SizeType
.Percent, 1);
1674
RowStyle rowStyle = new(
SizeType
.Percent, 2);
1709
ColumnStyle columnStyle = new(
SizeType
.Percent, 1);
1710
RowStyle rowStyle = new(
SizeType
.Percent, 2);
1776
ColumnStyle columnStyle = new(
SizeType
.Percent, 1);
1777
RowStyle rowStyle = new(
SizeType
.Percent, 2);
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (11)
50
Assert.Equal(
SizeType
.AutoSize, settings.ColumnStyles[0].SizeType);
52
Assert.Equal(
SizeType
.Absolute, settings.ColumnStyles[1].SizeType);
54
Assert.Equal(
SizeType
.AutoSize, settings.ColumnStyles[2].SizeType);
56
Assert.Equal(
SizeType
.Percent, settings.ColumnStyles[3].SizeType);
58
Assert.Equal(
SizeType
.Percent, settings.ColumnStyles[4].SizeType);
62
Assert.Equal(
SizeType
.AutoSize, settings.RowStyles[0].SizeType);
64
Assert.Equal(
SizeType
.Absolute, settings.RowStyles[1].SizeType);
178
settings.ColumnStyles.Add(new ColumnStyle(
SizeType
.AutoSize, 1));
179
settings.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 2));
180
settings.RowStyles.Add(new RowStyle(
SizeType
.AutoSize, 1));
181
settings.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 2));
System\Windows\Forms\RowStyleTests.cs (11)
14
Assert.Equal(
SizeType
.AutoSize, style.SizeType);
19
[EnumData<
SizeType
>]
20
[InvalidEnumData<
SizeType
>]
21
public void RowStyle_Ctor_SizeType(
SizeType
sizeType)
29
[InlineData(
SizeType
.AutoSize, 0)]
30
[InlineData(
SizeType
.Absolute, 1)]
31
[InlineData(
SizeType
.Percent, 2)]
32
[InlineData((
SizeType
.AutoSize - 1), 3)]
33
[InlineData((
SizeType
.Percent + 1), 4)]
34
public void RowStyle_Ctor_SizeType_Float(
SizeType
sizeType, float width)
44
Assert.Throws<ArgumentOutOfRangeException>("value", () => new RowStyle(
SizeType
.AutoSize, -1));
System\Windows\Forms\TableLayoutPanelTests.cs (30)
448
ColumnStyle columnStyle = new(
SizeType
.Percent, 1);
449
RowStyle rowStyle = new(
SizeType
.Percent, 1);
484
ColumnStyle columnStyle = new(
SizeType
.Percent, 1);
485
RowStyle rowStyle = new(
SizeType
.Percent, 1);
548
settings.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 1));
549
settings.RowStyles.Add(new RowStyle(
SizeType
.Percent, 1));
981
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize, 20));
984
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize, 30));
987
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize, 6));
1003
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 10));
1006
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 5));
1009
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 6));
1026
control.RowStyles.Add(new RowStyle(
SizeType
.Percent, 20));
1029
control.RowStyles.Add(new RowStyle(
SizeType
.Percent, 30));
1032
control.RowStyles.Add(new RowStyle(
SizeType
.Percent, 6));
1049
control.RowStyles.Add(new RowStyle(
SizeType
.Percent, 75));
1052
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 100));
1069
control.RowStyles.Add(new RowStyle(
SizeType
.Percent, 75));
1072
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize, 100));
1089
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 50));
1092
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize, 100));
1109
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 100));
1112
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 100));
1129
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize - 1, 22));
1132
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize - 1, 22));
1135
control.RowStyles.Add(new RowStyle(
SizeType
.AutoSize - 1, 6));
1517
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 10));
1518
control.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 10));
1519
control.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 10));
1520
control.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 10));
System\Windows\Forms\TableLayoutStyleTests.cs (32)
18
Assert.Equal(
SizeType
.AutoSize, style.SizeType);
22
[EnumData<
SizeType
>]
23
[InvalidEnumData<
SizeType
>]
24
public void TableLayoutStyle_SizeType_Set_GetReturnsExpected(
SizeType
value)
38
[InlineData(
SizeType
.Absolute, 1)]
39
[InlineData(
SizeType
.AutoSize, 0)]
40
[InlineData(
SizeType
.Percent, 1)]
41
[InlineData((
SizeType
.AutoSize - 1), 1)]
42
[InlineData((
SizeType
.Percent + 1), 1)]
43
public void TableLayoutStyle_SizeType_SetWithOwner_GetReturnsExpected(
SizeType
value, int expectedLayoutCallCount)
70
[InlineData(
SizeType
.Absolute, 1)]
71
[InlineData(
SizeType
.AutoSize, 0)]
72
[InlineData(
SizeType
.Percent, 1)]
73
[InlineData((
SizeType
.AutoSize - 1), 1)]
74
[InlineData((
SizeType
.Percent + 1), 1)]
75
public void TableLayoutStyle_SizeType_SetWithOwnerWithHandle_GetReturnsExpected(
SizeType
value, int expectedLayoutCallCount)
128
yield return new object[] { new RowStyle(
SizeType
.AutoSize, 1), typeof(RowStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() };
129
yield return new object[] { new RowStyle(
SizeType
.Absolute, 1), typeof(RowStyle).GetConstructor([typeof(
SizeType
), typeof(int)]), new object[] {
SizeType
.Absolute, 1f } };
130
yield return new object[] { new RowStyle(
SizeType
.Percent, 1), typeof(RowStyle).GetConstructor([typeof(
SizeType
), typeof(int)]), new object[] {
SizeType
.Percent, 1f } };
131
yield return new object[] { new ColumnStyle(
SizeType
.AutoSize, 1), typeof(ColumnStyle).GetConstructor(Array.Empty<Type>()), Array.Empty<object>() };
132
yield return new object[] { new ColumnStyle(
SizeType
.Absolute, 1), typeof(ColumnStyle).GetConstructor([typeof(
SizeType
), typeof(int)]), new object[] {
SizeType
.Absolute, 1f } };
133
yield return new object[] { new ColumnStyle(
SizeType
.Percent, 1), typeof(ColumnStyle).GetConstructor([typeof(
SizeType
), typeof(int)]), new object[] {
SizeType
.Percent, 1f } };
147
[InvalidEnumData<
SizeType
>]
148
public void TableLayoutStyle_ConverterConvertTo_InvalidSizeType_ThrowsNotSupportedException(
SizeType
sizeType)
System.Windows.Forms.UI.IntegrationTests (1)
DragDropTests.cs (1)
1005
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.AutoSize));
TestPassApp (14)
ContainerControls2.Designer.cs (14)
139
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
140
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
141
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 23F));
142
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 23F));
143
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Absolute, 25F));
148
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
149
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
150
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 23F));
151
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 23F));
152
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Absolute, 23F));
404
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
405
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
410
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
411
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.
SizeType
.Percent, 50F));
WinFormsControlsTest (18)
Buttons.cs (5)
33
table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
34
table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
35
table.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
36
table.RowStyles.Add(new RowStyle(
SizeType
.Percent, 70.0f));
37
table.RowStyles.Add(new RowStyle(
SizeType
.Percent, 30.0f));
DragDrop.cs (1)
428
tableLayoutPanel.ColumnStyles.Add(new ColumnStyle(
SizeType
.AutoSize));
DragDrop.Designer.cs (12)
59
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(
SizeType
.Absolute, 115F));
60
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 55.55556F));
61
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 44.44445F));
74
tableLayoutPanel1.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 112F));
75
tableLayoutPanel1.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 112F));
76
tableLayoutPanel1.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 112F));
77
tableLayoutPanel1.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 112F));
78
tableLayoutPanel1.RowStyles.Add(new RowStyle(
SizeType
.Absolute, 112F));
79
tableLayoutPanel1.RowStyles.Add(new RowStyle(
SizeType
.Percent, 100F));
163
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
164
tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(
SizeType
.Percent, 50F));
171
tableLayoutPanel2.RowStyles.Add(new RowStyle(
SizeType
.Percent, 50F));