453 references to DefaultFont
System.Windows.Forms (21)
System\Windows\Forms\ActiveX\AxHost.cs (2)
3716
return
DefaultFont
;
3804
return
DefaultFont
;
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (1)
61
return hr.Failed ?
DefaultFont
: Font.FromHfont(nativeFont.Value->hFont);
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (3)
36
_lastFont = Control.
DefaultFont
;
59
_lastFont = Control.
DefaultFont
;
67
managedValue ??= Control.
DefaultFont
;
System\Windows\Forms\Control.cs (2)
1952
s_defaultFontHandleWrapper ??= new FontHandleWrapper(
DefaultFont
);
5462
return AmbientPropertiesService?.Font ??
DefaultFont
;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
157
s_defaultHeight = Control.
DefaultFont
.Height + 9;
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
480
Font =
DefaultFont
;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
369
s_defaultListBoxItemHeight =
DefaultFont
.Height;
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
399
return Control.
DefaultFont
;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
150
return _owner?._listView?.Font ?? Control.
DefaultFont
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1487
return Control.
DefaultFont
;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
57
return Control.
DefaultFont
;
106
sysFont ??= Control.
DefaultFont
;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
169
Font? uiFont =
DefaultFont
;
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (2)
139
Font? result = _font ?? Control.
DefaultFont
;
450
private bool ShouldSerializeFont() => !Font.Equals(Control.
DefaultFont
);
System\Windows\Forms\SystemInformation.cs (1)
165
return Control.
DefaultFont
;
System\Windows\Forms\ToolTip\ToolTip.cs (1)
2333
font = Control.
DefaultFont
;
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
56
Font uiFont = Control.
DefaultFont
;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
801
uiFont =
DefaultFont
;
System\Windows\Forms\Design\TabOrder.cs (1)
48
_tabFont = uisvc is not null && uisvc.Styles["DialogFont"] is Font dialogFont ? dialogFont :
DefaultFont
;
System.Windows.Forms.Design.Tests (1)
System\ComponentModel\Design\ByteViewerTests.cs (1)
78
Assert.Equal(Control.
DefaultFont
, control.Font);
System.Windows.Forms.Tests (427)
System\Windows\Forms\AxHostTests.cs (4)
75
Assert.Equal(Control.
DefaultFont
, control.Font);
169
Assert.Equal(Control.
DefaultFont
, control.Font);
522
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
528
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
System\Windows\Forms\ButtonBaseTests.cs (1)
68
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ButtonTests.cs (4)
71
Assert.Equal(Control.
DefaultFont
, control.Font);
674
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
680
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
737
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\CheckBoxTests.cs (1)
72
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ComboBoxTests.cs (5)
79
Assert.Equal(Control.
DefaultFont
, control.Font);
90
Assert.Equal(Control.
DefaultFont
.Height + 2, control.ItemHeight);
992
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
998
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1035
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (1)
46
Assert.NotEqual(font, Control.
DefaultFont
);
System\Windows\Forms\ContainerControlTests.cs (6)
79
Assert.Equal(Control.
DefaultFont
, control.Font);
412
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
418
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
433
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
440
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
478
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ControlTests.ControlCollection.cs (12)
571
Assert.Equal(Control.
DefaultFont
, control.Font);
615
Assert.Equal(Control.
DefaultFont
, control.Font);
651
Assert.Equal(Control.
DefaultFont
, control.Font);
801
Assert.Equal(Control.
DefaultFont
, control.Font);
954
Assert.Equal(Control.
DefaultFont
, control.Font);
1027
Assert.Equal(Control.
DefaultFont
, control.Font);
2268
Assert.Equal(Control.
DefaultFont
, control.Font);
2315
Assert.Equal(Control.
DefaultFont
, control.Font);
2459
Assert.Equal(Control.
DefaultFont
, control.Font);
2592
Assert.Equal(Control.
DefaultFont
, control.Font);
2665
Assert.Equal(Control.
DefaultFont
, control.Font);
2743
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ControlTests.cs (8)
60
Assert.Equal(Control.
DefaultFont
, control.Font);
149
Assert.Equal(Control.
DefaultFont
, control.Font);
245
Assert.Equal(Control.
DefaultFont
, control.Font);
341
Assert.Equal(Control.
DefaultFont
, control.Font);
437
Assert.Equal(Control.
DefaultFont
, control.Font);
493
Font font = Control.
DefaultFont
;
494
Assert.Equal(SystemFonts.MessageBoxFont, Control.
DefaultFont
);
495
Assert.Same(font, Control.
DefaultFont
);
System\Windows\Forms\ControlTests.Handlers.cs (6)
1639
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1646
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1670
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1677
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1716
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1726
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
System\Windows\Forms\ControlTests.Methods.cs (3)
6442
Assert.Equal(Control.
DefaultFont
, control.Font);
6447
Assert.Equal(Control.
DefaultFont
, control.Font);
6451
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ControlTests.Properties.cs (24)
4827
Assert.Equal(Control.
DefaultFont
, control.Font);
4842
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4848
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4869
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4875
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4883
yield return new object[] { null, Control.
DefaultFont
.Height };
4898
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4904
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4919
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4925
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4956
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
4965
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
5002
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
5011
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
5051
Assert.Equal(Control.
DefaultFont
, control.Font);
5126
Assert.Equal(Control.
DefaultFont
, control.Font);
5127
Assert.Equal(Control.
DefaultFont
, child1.Font);
5128
Assert.Equal(Control.
DefaultFont
, child2.Font);
5219
Assert.Equal(Control.
DefaultFont
, control.Font);
5252
Assert.Equal(Control.
DefaultFont
, control.Font);
5260
Assert.Equal(Control.
DefaultFont
, control.Font);
5277
Assert.Equal(Control.
DefaultFont
, control.Font);
5285
Assert.Equal(Control.
DefaultFont
, control.Font);
10878
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\DataGridViewCellTests.cs (1)
4893
Assert.Equal(new Size(10, Control.
DefaultFont
.Height + 9), cell.GetSize(rowIndex));
System\Windows\Forms\DataGridViewRowHeightInfoNeededEventArgsTests.cs (1)
54
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
System\Windows\Forms\DataGridViewRowTests.cs (35)
33
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
1792
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
1809
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
1820
yield return new object[] { DataGridViewAutoSizeRowsMode.AllHeaders, 2, 1, Control.
DefaultFont
.Height + 9, 0 };
1821
yield return new object[] { DataGridViewAutoSizeRowsMode.AllCellsExceptHeaders, 2, 1, Control.
DefaultFont
.Height + 9, 0 };
1822
yield return new object[] { DataGridViewAutoSizeRowsMode.AllCells, 2, 1, Control.
DefaultFont
.Height + 9, 0 };
1823
yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedHeaders, 2, 1, Control.
DefaultFont
.Height + 9, 0 };
1824
yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedCellsExceptHeaders, 2, 1, Control.
DefaultFont
.Height + 9, 0 };
1825
yield return new object[] { DataGridViewAutoSizeRowsMode.DisplayedCells, 2, 1, Control.
DefaultFont
.Height + 9, 0 };
1846
Assert.Equal(Control.
DefaultFont
.Height + 9, e.Height);
1858
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
1881
Assert.Equal(Control.
DefaultFont
.Height + 9, e.Height);
1893
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
1931
yield return new object[] { autoSizeRowsMode, -1, Control.
DefaultFont
.Height + 9 };
1932
yield return new object[] { autoSizeRowsMode, 0, Control.
DefaultFont
.Height + 9 };
1933
yield return new object[] { autoSizeRowsMode, 1, Control.
DefaultFont
.Height + 9 };
1934
yield return new object[] { autoSizeRowsMode, 3, Control.
DefaultFont
.Height + 9 };
1935
yield return new object[] { autoSizeRowsMode, 4, Control.
DefaultFont
.Height + 9 };
1936
yield return new object[] { autoSizeRowsMode, 65536, Control.
DefaultFont
.Height + 9 };
2032
Assert.Equal(Control.
DefaultFont
.Height + 9, rowDefaultHeight);
2033
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
2315
Assert.Equal(Control.
DefaultFont
.Height + 9, e.Height);
2350
Assert.Equal(Control.
DefaultFont
.Height + 9, e.Height);
2368
yield return new object[] { 2, 2, Control.
DefaultFont
.Height + 9 };
2369
yield return new object[] { 3, 3, Control.
DefaultFont
.Height + 9 };
2370
yield return new object[] { 4, 4, Control.
DefaultFont
.Height + 9 };
2400
yield return new object[] { autoSizeRowsMode, 2, 2, Control.
DefaultFont
.Height + 9 };
2401
yield return new object[] { autoSizeRowsMode, 3, 3, Control.
DefaultFont
.Height + 9 };
2402
yield return new object[] { autoSizeRowsMode, 4, 4, Control.
DefaultFont
.Height + 9 };
2403
yield return new object[] { autoSizeRowsMode, 65536, 65536, Control.
DefaultFont
.Height + 9 };
2406
yield return new object[] { DataGridViewAutoSizeRowsMode.None, 2, 2, Control.
DefaultFont
.Height + 9 };
2407
yield return new object[] { DataGridViewAutoSizeRowsMode.None, 3, 3, Control.
DefaultFont
.Height + 9 };
2408
yield return new object[] { DataGridViewAutoSizeRowsMode.None, 4, 4, Control.
DefaultFont
.Height + 9 };
2487
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
3912
Assert.Equal(Control.
DefaultFont
.Height + 9, row.Height);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (4)
14
private static readonly int s_preferredHeight = Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3;
76
Assert.Equal(Control.
DefaultFont
, control.Font);
744
Assert.Equal(expectedFont ?? Control.
DefaultFont
, control.Font);
955
Assert.Equal(expectedFont ?? Control.
DefaultFont
, control.Font);
System\Windows\Forms\DateTimePickerTests.cs (3)
38
Assert.Equal(Control.
DefaultFont
, control.CalendarFont);
76
Assert.Equal(Control.
DefaultFont
, control.Font);
99
Assert.Equal(Control.
DefaultFont
.Height + 7, control.PreferredHeight);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (1)
92
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (1)
76
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\DomainUpDownTests.cs (8)
57
_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 120, Control.
DefaultFont
.Height + 7));
58
_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 120, Control.
DefaultFont
.Height + 7));
59
_sub.ClientSize.Should().Be(new Size(120, Control.
DefaultFont
.Height + 7));
64
_sub.ClientRectangle.Should().Be(new Rectangle(0, 0, 116, Control.
DefaultFont
.Height + 3));
65
_sub.DisplayRectangle.Should().Be(new Rectangle(0, 0, 116, Control.
DefaultFont
.Height + 3));
66
_sub.ClientSize.Should().Be(new Size(116, Control.
DefaultFont
.Height + 3));
98
_sub.Font.Should().Be(Control.
DefaultFont
);
123
_sub.PreferredHeight.Should().Be(Control.
DefaultFont
.Height + 7);
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
73
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\FontDialogTests.cs (10)
26
Assert.Equal(Control.
DefaultFont
, dialog.Font);
56
Assert.Equal(Control.
DefaultFont
, dialog.Font);
303
Assert.Equal(value ?? Control.
DefaultFont
, dialog.Font);
307
Assert.Equal(value ?? Control.
DefaultFont
, dialog.Font);
321
Assert.Equal(value ?? Control.
DefaultFont
, dialog.Font);
325
Assert.Equal(value ?? Control.
DefaultFont
, dialog.Font);
341
Assert.Equal(Control.
DefaultFont
, dialog.Font);
358
Assert.Equal(Control.
DefaultFont
, dialog.Font);
615
Assert.Equal(Control.
DefaultFont
, dialog.Font);
749
Assert.Equal($"System.Windows.Forms.Tests.FontDialogTests+SubFontDialog, Font: {Control.
DefaultFont
}", dialog.ToString());
System\Windows\Forms\FormTests.cs (1)
94
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\GroupBoxTests.cs (20)
56
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
64
Assert.Equal(Control.
DefaultFont
, control.Font);
83
Assert.Equal(new Size(6, 6 + Control.
DefaultFont
.Height), control.PreferredSize);
569
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
578
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
1514
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1515
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
1522
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1523
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
1562
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1563
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
1573
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
1574
Assert.Equal(new Rectangle(3, Control.
DefaultFont
.Height + 3, 194, 94 - Control.
DefaultFont
.Height), control.DisplayRectangle);
System\Windows\Forms\HScrollBarTests.cs (1)
71
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\LabelTests.cs (1)
64
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ListBoxTests.cs (34)
71
Assert.Equal(Control.
DefaultFont
, control.Font);
86
Assert.Equal(Control.
DefaultFont
.Height, control.ItemHeight);
100
Assert.Equal(Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3, control.PreferredHeight);
1058
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1066
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1086
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1094
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1126
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1137
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1175
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1186
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1228
Assert.Equal(Control.
DefaultFont
, control.Font);
1742
yield return new object[] { DrawMode.Normal, integralHeight, Control.
DefaultFont
.Height, 0 };
1745
yield return new object[] { DrawMode.OwnerDrawFixed, integralHeight, Control.
DefaultFont
.Height, 0 };
1748
yield return new object[] { DrawMode.OwnerDrawVariable, integralHeight, Control.
DefaultFont
.Height, 0 };
1826
Assert.Equal(Control.
DefaultFont
.Height, control.ItemHeight);
1842
Assert.Equal(Control.
DefaultFont
.Height, control.ItemHeight);
2051
yield return new object[] { DrawMode.Normal, BorderStyle.Fixed3D, Control.
DefaultFont
.Height + extra };
2052
yield return new object[] { DrawMode.Normal, BorderStyle.FixedSingle, Control.
DefaultFont
.Height + extra };
2053
yield return new object[] { DrawMode.Normal, BorderStyle.None, Control.
DefaultFont
.Height };
2055
yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.Fixed3D, Control.
DefaultFont
.Height + extra };
2056
yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.FixedSingle, Control.
DefaultFont
.Height + extra };
2057
yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.None, Control.
DefaultFont
.Height };
2080
yield return new object[] { DrawMode.Normal, BorderStyle.Fixed3D, (Control.
DefaultFont
.Height * 2) + extra };
2081
yield return new object[] { DrawMode.Normal, BorderStyle.FixedSingle, (Control.
DefaultFont
.Height * 2) + extra };
2082
yield return new object[] { DrawMode.Normal, BorderStyle.None, (Control.
DefaultFont
.Height * 2) };
2084
yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.Fixed3D, (Control.
DefaultFont
.Height * 2) + extra };
2085
yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.FixedSingle, (Control.
DefaultFont
.Height * 2) + extra };
2086
yield return new object[] { DrawMode.OwnerDrawFixed, BorderStyle.None, (Control.
DefaultFont
.Height * 2) };
2088
yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.Fixed3D, (Control.
DefaultFont
.Height * 2) + extra };
2089
yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.FixedSingle, (Control.
DefaultFont
.Height * 2) + extra };
2090
yield return new object[] { DrawMode.OwnerDrawVariable, BorderStyle.None, (Control.
DefaultFont
.Height * 2) };
5149
Assert.Equal(Control.
DefaultFont
.Height, control.GetItemHeight(0));
5172
Assert.Equal(Control.
DefaultFont
.Height, control.GetItemHeight(index));
System\Windows\Forms\ListControlTests.cs (1)
67
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ListViewItemTests.cs (26)
20
Assert.Equal(Control.
DefaultFont
, item.Font);
59
Assert.Equal(font ?? Control.
DefaultFont
, item.Font);
97
Assert.Equal(font ?? Control.
DefaultFont
, item.Font);
135
Assert.Equal(font ?? Control.
DefaultFont
, item.Font);
173
Assert.Equal(font ?? Control.
DefaultFont
, item.Font);
210
Assert.Equal(Control.
DefaultFont
, item.Font);
247
Assert.Equal(Control.
DefaultFont
, item.Font);
285
Assert.Equal(Control.
DefaultFont
, item.Font);
323
Assert.Equal(Control.
DefaultFont
, item.Font);
360
Assert.Equal(Control.
DefaultFont
, item.Font);
398
Assert.Equal(Control.
DefaultFont
, item.Font);
436
Assert.Equal(Control.
DefaultFont
, item.Font);
473
Assert.Equal(Control.
DefaultFont
, item.Font);
511
Assert.Equal(Control.
DefaultFont
, item.Font);
549
Assert.Equal(Control.
DefaultFont
, item.Font);
587
Assert.Equal(Control.
DefaultFont
, item.Font);
624
Assert.Equal(Control.
DefaultFont
, item.Font);
662
Assert.Equal(Control.
DefaultFont
, item.Font);
700
Assert.Equal(Control.
DefaultFont
, item.Font);
737
Assert.Equal(Control.
DefaultFont
, item.Font);
776
Assert.Equal(Control.
DefaultFont
, item.Font);
806
Assert.Equal(Control.
DefaultFont
, item.Font);
971
Assert.Equal(value ?? Control.
DefaultFont
, item.Font);
975
Assert.Equal(Control.
DefaultFont
, item.Font);
987
Assert.Equal(value ?? Control.
DefaultFont
, item.Font);
991
Assert.Equal(value ?? Control.
DefaultFont
, item.Font);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (3)
276
Assert.Equal(font ?? Control.
DefaultFont
, subItem.Font);
406
Assert.Equal(font ?? Control.
DefaultFont
, collection[0].Font);
410
Assert.Equal(font ?? Control.
DefaultFont
, collection[1].Font);
System\Windows\Forms\ListViewSubItemTests.cs (14)
19
Assert.Equal(Control.
DefaultFont
, subItem.Font);
46
Assert.Equal(Control.
DefaultFont
, subItem.Font);
72
Assert.Equal(font ?? Control.
DefaultFont
, subItem.Font);
241
Assert.Equal(Control.
DefaultFont
, subItem.Font);
245
Assert.Equal(Control.
DefaultFont
, subItem.Font);
267
Assert.Equal(Control.
DefaultFont
, subItem.Font);
278
Assert.Same(value ?? Control.
DefaultFont
, subItem.Font);
282
Assert.Same(value ?? Control.
DefaultFont
, subItem.Font);
321
Assert.Equal(value ?? Control.
DefaultFont
, subItem.Font);
325
Assert.Equal(value ?? Control.
DefaultFont
, subItem.Font);
544
Assert.Equal(Control.
DefaultFont
, subItem.Font);
549
Assert.Equal(Control.
DefaultFont
, subItem.Font);
561
Assert.Equal(Control.
DefaultFont
, subItem.Font);
566
Assert.Equal(Control.
DefaultFont
, subItem.Font);
System\Windows\Forms\ListViewTests.cs (1)
79
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\MdiClientTests.cs (1)
50
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\MdiControlStripTests.cs (1)
81
Assert.Equal(Control.
DefaultFont
, mdiControlStrip.Font);
System\Windows\Forms\MenuStripTests.cs (1)
79
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\MonthCalendarTests.cs (1)
81
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\PanelTests.cs (1)
73
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\PictureBoxTests.cs (4)
68
Assert.Equal(Control.
DefaultFont
, control.Font);
475
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
481
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
518
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ProgressBarTests.cs (4)
61
Assert.Equal(Control.
DefaultFont
, control.Font);
480
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
486
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
523
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\PropertyGridInternal\PropertyGridViewTests.Rendering.cs (5)
42
Validate.TextOut("Misc", new(25, 4, 25, 14), stateValidators: State.FontFace(Control.
DefaultFont
.Name))),
48
Validate.TextOut(pt.X.ToString(), new(145, 22, 5, 14), stateValidators: State.FontFace(Control.
DefaultFont
.Name))),
51
Validate.TextOut(nameof(Point.X), new(25, 23, 6, 14), stateValidators: State.FontFace(Control.
DefaultFont
.Name))),
57
Validate.TextOut(pt.Y.ToString(), new(145, 41, 5, 14), stateValidators: State.FontFace(Control.
DefaultFont
.Name))),
60
Validate.TextOut(nameof(Point.Y), new(25, 42, 6, 14), stateValidators: State.FontFace(Control.
DefaultFont
.Name))),
System\Windows\Forms\PropertyGridTests.cs (1)
102
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\RadioButtonTests.cs (1)
71
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\RichTextBoxTests.cs (21)
22
private static readonly int s_preferredHeight = Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3;
80
Assert.Equal(Control.
DefaultFont
, control.Font);
1337
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1343
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1357
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1363
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1379
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1385
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1402
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1408
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1439
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1448
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1476
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1485
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1523
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1532
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1562
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1571
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1626
Assert.Equal(Control.
DefaultFont
.Name, format1.FaceName.ToString());
1627
Assert.Equal((int)(Control.
DefaultFont
.SizeInPoints * 20), format1.yHeight);
1665
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ScrollableControlTests.cs (1)
72
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ScrollBarTests.cs (4)
61
Assert.Equal(Control.
DefaultFont
, control.Font);
488
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
494
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
531
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\SplitterPanelTests.cs (1)
66
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\SplitterTests.cs (4)
62
Assert.Equal(Control.
DefaultFont
, control.Font);
740
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
746
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
783
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\StatusStripTests.cs (1)
79
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\TabControlTests.cs (1)
64
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\TableLayoutPanelTests.cs (1)
78
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\TabPageTests.cs (2)
78
Assert.Equal(Control.
DefaultFont
, control.Font);
187
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ToolStripButtonTests.cs (6)
55
Assert.NotSame(Control.
DefaultFont
, item.Font);
136
Assert.NotSame(Control.
DefaultFont
, item.Font);
223
Assert.NotSame(Control.
DefaultFont
, item.Font);
313
Assert.NotSame(Control.
DefaultFont
, item.Font);
401
Assert.NotSame(Control.
DefaultFont
, item.Font);
499
Assert.NotSame(Control.
DefaultFont
, item.Font);
System\Windows\Forms\ToolStripContentPanelTests.cs (1)
75
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ToolStripControlHostTests.cs (8)
973
Assert.Equal(value ?? Control.
DefaultFont
, item.Font);
974
Assert.Equal(value ?? Control.
DefaultFont
, c.Font);
979
Assert.Equal(value ?? Control.
DefaultFont
, item.Font);
980
Assert.Equal(value ?? Control.
DefaultFont
, c.Font);
1009
Assert.Equal(Control.
DefaultFont
, item.Font);
1017
Assert.Equal(Control.
DefaultFont
, item.Font);
1049
Assert.Equal(Control.
DefaultFont
, item.Font);
1057
Assert.Equal(Control.
DefaultFont
, item.Font);
System\Windows\Forms\ToolStripDropDownItemTests.cs (4)
53
Assert.NotSame(Control.
DefaultFont
, item.Font);
142
Assert.NotSame(Control.
DefaultFont
, item.Font);
241
Assert.NotSame(Control.
DefaultFont
, item.Font);
349
Assert.NotSame(Control.
DefaultFont
, item.Font);
System\Windows\Forms\ToolStripDropDownTests.cs (10)
84
Assert.Equal(Control.
DefaultFont
, control.Font);
1476
Assert.NotSame(Control.
DefaultFont
, control.Font);
1514
Assert.NotSame(Control.
DefaultFont
, control.Font);
1530
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1536
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1573
Assert.Equal(Control.
DefaultFont
, control.Font);
1626
Assert.Equal(Control.
DefaultFont
, control.Font);
1627
Assert.Equal(Control.
DefaultFont
, item1.Font);
1628
Assert.Equal(Control.
DefaultFont
, item2.Font);
1691
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ToolStripItemTests.cs (11)
54
Assert.NotSame(Control.
DefaultFont
, item.Font);
139
Assert.NotSame(Control.
DefaultFont
, item.Font);
234
Assert.NotSame(Control.
DefaultFont
, item.Font);
2943
Assert.NotSame(Control.
DefaultFont
, item.Font);
3189
Assert.NotSame(Control.
DefaultFont
, item.Font);
3199
Assert.NotSame(Control.
DefaultFont
, item.Font);
3218
Assert.NotSame(Control.
DefaultFont
, item.Font);
3228
Assert.NotSame(Control.
DefaultFont
, item.Font);
14122
Assert.NotSame(Control.
DefaultFont
, item.Font);
14129
Assert.NotSame(Control.
DefaultFont
, item.Font);
14135
Assert.NotSame(Control.
DefaultFont
, item.Font);
System\Windows\Forms\ToolStripMenuItemTests.cs (1)
57
Assert.NotSame(Control.
DefaultFont
, item.Font);
System\Windows\Forms\ToolStripPanelTests.cs (1)
75
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\ToolStripSeparatorTests.cs (1)
52
Assert.NotSame(Control.
DefaultFont
, item.Font);
System\Windows\Forms\ToolStripTests.cs (13)
94
Assert.Equal(Control.
DefaultFont
, control.Font);
248
Assert.Equal(Control.
DefaultFont
, control.Font);
1392
Assert.NotSame(Control.
DefaultFont
, control.Font);
1430
Assert.NotSame(Control.
DefaultFont
, control.Font);
1446
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1452
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1489
Assert.Equal(Control.
DefaultFont
, control.Font);
1542
Assert.Equal(Control.
DefaultFont
, control.Font);
1543
Assert.Equal(Control.
DefaultFont
, item1.Font);
1544
Assert.Equal(Control.
DefaultFont
, item2.Font);
1607
Assert.Equal(Control.
DefaultFont
, control.Font);
5265
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
5272
Assert.Equal(Control.
DefaultFont
.Height, control.FontHeight);
System\Windows\Forms\TreeViewTests.cs (3)
65
Assert.Equal(Control.
DefaultFont
, control.Font);
81
Assert.Equal(Control.
DefaultFont
.Height + 3, control.ItemHeight);
2734
yield return new object[] { -1, Control.
DefaultFont
.Height + 3 };
System\Windows\Forms\UpDownBaseTests.cs (32)
44
Assert.Equal(new Rectangle(0, 0, 120, Control.
DefaultFont
.Height + 7), control.ClientRectangle);
45
Assert.Equal(new Rectangle(0, 0, 120, Control.
DefaultFont
.Height + 7), control.DisplayRectangle);
46
Assert.Equal(new Size(120, Control.
DefaultFont
.Height + 7), control.ClientSize);
51
Assert.Equal(new Rectangle(0, 0, 116, Control.
DefaultFont
.Height + 3), control.ClientRectangle);
52
Assert.Equal(new Rectangle(0, 0, 116, Control.
DefaultFont
.Height + 3), control.DisplayRectangle);
53
Assert.Equal(new Size(116, Control.
DefaultFont
.Height + 3), control.ClientSize);
85
Assert.Equal(Control.
DefaultFont
, control.Font);
108
Assert.Equal(Control.
DefaultFont
.Height + 7, control.PreferredHeight);
719
yield return new object[] { BorderStyle.Fixed3D, new Size(122, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
720
yield return new object[] { BorderStyle.FixedSingle, new Size(122, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
721
yield return new object[] { BorderStyle.None, new Size(122, Control.
DefaultFont
.Height + 3) };
725
yield return new object[] { BorderStyle.Fixed3D, new Size(123, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
726
yield return new object[] { BorderStyle.FixedSingle, new Size(121, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
727
yield return new object[] { BorderStyle.None, new Size(119, Control.
DefaultFont
.Height + 3) };
756
yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(122, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
757
yield return new object[] { BorderStyle.FixedSingle, 0, 1, new Size(122, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
758
yield return new object[] { BorderStyle.None, 1, 1, new Size(123, Control.
DefaultFont
.Height + 3) };
762
yield return new object[] { BorderStyle.Fixed3D, 0, 0, new Size(123, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
763
yield return new object[] { BorderStyle.FixedSingle, 1, 1, new Size(123, Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3) };
764
yield return new object[] { BorderStyle.None, 2, 1, new Size(123, Control.
DefaultFont
.Height + 3) };
2755
Assert.Equal(new Size(width, Control.
DefaultFont
.Height + 7), control.ClientSize);
2756
Assert.Equal(new Rectangle(0, 0, width, Control.
DefaultFont
.Height + 7), control.ClientRectangle);
2757
Assert.Equal(new Rectangle(0, 0, width, Control.
DefaultFont
.Height + 7), control.DisplayRectangle);
2761
Assert.Equal(new Size(width - 4, Control.
DefaultFont
.Height + 3), control.ClientSize);
2762
Assert.Equal(new Rectangle(0, 0, width - 4, Control.
DefaultFont
.Height + 3), control.ClientRectangle);
2763
Assert.Equal(new Rectangle(0, 0, width - 4, Control.
DefaultFont
.Height + 3), control.DisplayRectangle);
2787
Assert.Equal(new Size(width, Control.
DefaultFont
.Height + 7), control.ClientSize);
2788
Assert.Equal(new Rectangle(0, 0, width, Control.
DefaultFont
.Height + 7), control.ClientRectangle);
2789
Assert.Equal(new Rectangle(0, 0, width, Control.
DefaultFont
.Height + 7), control.DisplayRectangle);
2793
Assert.Equal(new Size(width - 4, Control.
DefaultFont
.Height + 3), control.ClientSize);
2794
Assert.Equal(new Rectangle(0, 0, width - 4, Control.
DefaultFont
.Height + 3), control.ClientRectangle);
2795
Assert.Equal(new Rectangle(0, 0, width - 4, Control.
DefaultFont
.Height + 3), control.DisplayRectangle);
System\Windows\Forms\UserControlTests.cs (1)
79
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\VScrollBarTests.cs (1)
70
Assert.Equal(Control.
DefaultFont
, control.Font);
System\Windows\Forms\WebBrowserTests.cs (1)
60
Assert.Equal(Control.
DefaultFont
, control.Font);
TextBoxBaseTests.cs (29)
16
private static readonly int s_preferredHeight = Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3;
875
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
881
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
895
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
901
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
917
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
923
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
940
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
946
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
977
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
986
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1014
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1023
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1061
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1070
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1100
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1109
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
1149
Assert.Equal(Control.
DefaultFont
, control.Font);
2277
yield return new object[] { BorderStyle.None, Control.
DefaultFont
.Height };
5008
yield return new object[] { multiline, wordWrap, BorderStyle.None, Size.Empty, new Size(0, Control.
DefaultFont
.Height) };
5009
yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(-1, -2), new Size(0, Control.
DefaultFont
.Height) };
5010
yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(10, 20), new Size(0, Control.
DefaultFont
.Height) };
5011
yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(30, 40), new Size(0, Control.
DefaultFont
.Height) };
5012
yield return new object[] { multiline, wordWrap, BorderStyle.None, new Size(int.MaxValue, int.MaxValue), new Size(0, Control.
DefaultFont
.Height) };
5069
yield return new object[] { BorderStyle.None, Size.Empty, 0, Control.
DefaultFont
.Height };
5070
yield return new object[] { BorderStyle.None, new Size(-1, -2), 0, Control.
DefaultFont
.Height };
5071
yield return new object[] { BorderStyle.None, new Size(10, 20), 0, Control.
DefaultFont
.Height };
5072
yield return new object[] { BorderStyle.None, new Size(30, 40), 0, Control.
DefaultFont
.Height };
5073
yield return new object[] { BorderStyle.None, new Size(int.MaxValue, int.MaxValue), 0, Control.
DefaultFont
.Height };
TextBoxTests.cs (2)
13
private static readonly int s_preferredHeight = Control.
DefaultFont
.Height + SystemInformation.BorderSize.Height * 4 + 3;
70
Assert.Equal(Control.
DefaultFont
, control.Font);
TrackBarTests.cs (4)
63
Assert.Equal(Control.
DefaultFont
, control.Font);
629
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
635
Assert.Equal(value ?? Control.
DefaultFont
, control.Font);
672
Assert.Equal(Control.
DefaultFont
, control.Font);
WinFormsControlsTest (1)
MainForm.cs (1)
244
Debug.WriteLine($"Default font: {Control.
DefaultFont
}", nameof(MainForm));