14 overrides of Font
System.Windows.Forms (13)
System\Windows\Forms\ActiveX\AxHost.cs (1)
339
public override Font
Font
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2616
public override Font
Font
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
430
public override Font
Font
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
281
public override Font
Font
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
193
public override Font
Font
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
389
public override Font
Font
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
159
public override Font
Font
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
517
public override Font
Font
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
95
public override Font
Font
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
218
public override Font
Font
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1252
public override Font
Font
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
637
public override Font
Font
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
170
public override Font
Font
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ComponentTray.cs (1)
1961
public override Font
Font
188 writes to Font
PresentationUI (9)
MS\Internal\Documents\DialogBaseForm.cs (1)
101
c.
Font
= System.Drawing.SystemFonts.DialogFont;
MS\Internal\Documents\RMEnrollmentPage1.Designer.cs (1)
150
_instructionlabel.
Font
= new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
MS\Internal\Documents\SignatureSummaryDialog.cs (6)
236
nameHeader.
Font
= columnHeaderFont;
245
intentHeader.
Font
= columnHeaderFont;
254
locationHeader.
Font
= columnHeaderFont;
263
signByHeader.
Font
= columnHeaderFont;
280
statusHeader.
Font
= columnHeaderFont;
289
intentHeader.
Font
= columnHeaderFont;
MS\Internal\Documents\SigningDialog.cs (1)
262
_signerlabel.
Font
= new Font(System.Drawing.SystemFonts.DialogFont, System.Drawing.SystemFonts.DialogFont.Style | FontStyle.Bold);
System.Windows.Forms (31)
System\Windows\Forms\ActiveX\AxHost.cs (1)
342
set => base.
Font
= value;
System\Windows\Forms\Control.cs (1)
9088
Font
= null;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2619
set => base.
Font
= value;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
73
Font
= dataGridViewCellStyle.Font;
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (1)
98
Font
= dataGridViewCellStyle.Font;
System\Windows\Forms\Controls\Labels\FocusableLabel.cs (2)
42
Font
= new Font(Font, FontStyle.Underline);
52
Font
= new Font(Font, FontStyle.Regular);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
435
base.
Font
= value;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
284
set => base.
Font
= value;
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
196
set => base.
Font
= value;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
17
Font
= controls[0].Font;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
232
_titleLabel.
Font
= new(Font, FontStyle.Bold);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (5)
576
Font
= Font
3467
ToolTip.
Font
= Font;
3495
ToolTip.
Font
= Font;
4359
EditTextBox.
Font
= GetBoldFont();
4363
EditTextBox.
Font
= Font;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
556
Font
= _gridView.Font;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (3)
396
base.
Font
= value;
402
base.
Font
= null;
416
base.
Font
= GetCharFormatFont(selectionOnly: false);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
162
set => base.
Font
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
533
set => base.
Font
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
48
Font
= ToolStripManager.DefaultFont
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
192
set => ControlInternal.
Font
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
100
base.
Font
= value;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
221
set => base.
Font
= value;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1255
set => base.
Font
= value;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
175
Font
= uiFont;
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
640
set => base.
Font
= value;
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
173
set => base.
Font
= value;
System.Windows.Forms.Design (11)
System\ComponentModel\Design\DesignerActionPanel.cs (1)
65
Font
= (Font)uiService.Styles["DialogFont"]!;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
24
Font
= font;
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (2)
94
_titleLabel.
Font
= new Font(ActionPanel.Font, FontStyle.Bold);
95
_subtitleLabel.
Font
= ActionPanel.Font;
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (2)
54
_label.
Font
= GetFont();
68
_label.
Font
= GetFont();
System\Windows\Forms\Design\ComponentTray.cs (2)
157
Font
= (Font)uiService.Styles["DialogFont"];
1425
Font
= (Font)uiService.Styles["DialogFont"];
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
61
Font
= uiFont;
System\Windows\Forms\Design\DataGridViewCellStyleEditor.cs (1)
30
_builderDialog.
Font
= (Font)uiService.Styles["DialogFont"]!;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
802
Font
= uiFont;
System.Windows.Forms.Tests (124)
System\Windows\Forms\ButtonTests.cs (8)
672
Font
= value
679
control.
Font
= value;
701
control.
Font
= font;
720
control.
Font
= font1;
725
control.
Font
= font1;
731
control.
Font
= font2;
736
control.
Font
= null;
742
control.
Font
= font1;
System\Windows\Forms\ComboBoxTests.cs (7)
990
Font
= value
997
control.
Font
= value;
1018
control.
Font
= font1;
1023
control.
Font
= font1;
1029
control.
Font
= font2;
1034
control.
Font
= null;
1040
control.
Font
= font1;
System\Windows\Forms\ContainerControlTests.cs (9)
410
Font
= value
417
control.
Font
= value;
432
control.
Font
= value;
439
control.
Font
= value;
461
control.
Font
= font1;
466
control.
Font
= font1;
472
control.
Font
= font2;
477
control.
Font
= null;
483
control.
Font
= font1;
System\Windows\Forms\ControlTests.ControlCollection.cs (8)
650
owner.
Font
= font;
800
owner.
Font
= font;
953
owner.
Font
= font;
1026
owner.
Font
= font;
2353
owner.
Font
= font;
2497
owner.
Font
= font;
2629
owner.
Font
= font;
2693
owner.
Font
= font;
System\Windows\Forms\ControlTests.Handlers.cs (3)
1788
Font
= childFont1
1792
Font
= childFont2
4491
Font
= font
System\Windows\Forms\ControlTests.Methods.cs (1)
6454
control.
Font
= font;
System\Windows\Forms\ControlTests.Properties.cs (42)
4801
Font
= font1
4810
control.
Font
= font2;
4830
control.
Font
= font2;
4840
Font
= value
4847
control.
Font
= value;
4867
Font
= value
4874
control.
Font
= value;
4894
Font
= new Font("Arial", 1)
4897
control.
Font
= value;
4903
control.
Font
= value;
4915
Font
= new Font("Arial", 1)
4918
control.
Font
= value;
4924
control.
Font
= value;
4955
control.
Font
= value;
4964
control.
Font
= value;
4988
Font
= new Font("Arial", 1)
5001
control.
Font
= value;
5010
control.
Font
= value;
5034
control.
Font
= font1;
5039
control.
Font
= font1;
5045
control.
Font
= font2;
5050
control.
Font
= null;
5056
control.
Font
= font1;
5097
control.
Font
= font1;
5106
control.
Font
= font1;
5116
control.
Font
= font2;
5125
control.
Font
= null;
5137
control.
Font
= font1;
5153
Font
= childFont1
5157
Font
= childFont2
5190
control.
Font
= font1;
5199
control.
Font
= font1;
5209
control.
Font
= font2;
5218
control.
Font
= null;
5230
control.
Font
= font1;
5247
control.
Font
= font;
5251
control.
Font
= null;
5255
control.
Font
= font;
5272
control.
Font
= font;
5276
control.
Font
= null;
5280
control.
Font
= font;
10960
Font
= controlFont
System\Windows\Forms\DataGridViewTests.cs (2)
2323
Font
= formFont1
2370
form.
Font
= formFont2;
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
107
Font
= formFont1,
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (2)
738
Font
= oldFont,
949
Font
= oldFont,
System\Windows\Forms\GroupBoxTests.cs (3)
580
control.
Font
= font;
592
Font
= font
606
groupBox.
Font
= newFont;
System\Windows\Forms\ListViewItemTests.cs (2)
966
Font
= value
1000
Font
= SystemFonts.CaptionFont
System\Windows\Forms\ListViewSubItemTests.cs (3)
219
Font
= SystemFonts.MenuFont
252
Font
= SystemFonts.CaptionFont
290
Font
= SystemFonts.CaptionFont
System\Windows\Forms\ToolStripControlHostTests.cs (2)
33
Font
= SystemFonts.MenuFont,
616
c.
Font
= value;
System\Windows\Forms\ToolStripDropDownTests.cs (1)
1487
Font
= font1
System\Windows\Forms\ToolStripTests.cs (3)
1403
Font
= font1
1634
form.
Font
= font;
1654
form.
Font
= font;
System\Windows\Forms\TreeViewTests.cs (1)
2725
Font
= font,
TextBoxBaseTests.cs (26)
873
Font
= value
880
control.
Font
= value;
893
Font
= value
900
control.
Font
= value;
913
Font
= oldValue
916
control.
Font
= value;
922
control.
Font
= value;
935
Font
= oldValue,
939
control.
Font
= value;
945
control.
Font
= value;
976
control.
Font
= value;
985
control.
Font
= value;
1013
control.
Font
= value;
1022
control.
Font
= value;
1047
Font
= oldValue
1060
control.
Font
= value;
1069
control.
Font
= value;
1085
Font
= oldValue,
1099
control.
Font
= value;
1108
control.
Font
= value;
1132
control.
Font
= font1;
1137
control.
Font
= font1;
1143
control.
Font
= font2;
1148
control.
Font
= null;
1154
control.
Font
= font1;
1282
Font
= font
WindowsFormsIntegration (4)
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (4)
141
adapter.
Font
= new SD.Font(familySource, adapter.Font.Size, adapter.Font.Style);
172
adapter.
Font
= new SD.Font(CurrentFontFamily, CurrentFontSize, style);
193
adapter.
Font
= new SD.Font(CurrentFontFamily, CurrentFontSize, style);
209
adapter.
Font
= new SD.Font(CurrentFontFamily, (float)pointSize, CurrentFontStyle);
WinFormsControlsTest (9)
DataGridViewInVirtualModeTest.Designer.cs (1)
87
this.
Font
= new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
DataGridViewTest.cs (1)
93
Font
= new Font("Tahoma", (float)numericUpDown1.Value, FontStyle.Regular);
DataGridViewTest.Designer.cs (3)
148
this.changeFontButton.
Font
= new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
196
this.resetFontButton.
Font
= new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
216
this.
Font
= new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
DragDrop.Designer.cs (1)
86
textBox.
Font
= new Font("Segoe UI", 14.25F);
ErrorProviderTest.Designer.cs (2)
59
this.label1.
Font
= new System.Drawing.Font("Calibri", 12F, FontStyle.Bold);
89
this.label2.
Font
= new System.Drawing.Font("Calibri", 12F, FontStyle.Bold);
ScalingBeforeChanges.cs (1)
100
Font
= new Font(Font.FontFamily, Font.Size * factorY, Font.Style);
460 references to Font
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Helpers\VBInputBox.vb (1)
93
Dim labelSizeNeeded As SizeF = labelGraphics.MeasureString(prompt, Label.
Font
, Label.Width)
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
229
Font columnHeaderFont = new System.Drawing.Font(
Font
, System.Drawing.FontStyle.Bold);
System.Windows.Forms (135)
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (1)
60
public override LOGFONTW Logfont => _owningControl.TryGetTarget(out Control? target) ? target.
Font
.ToLogicalFont() : default;
System\Windows\Forms\ActiveX\AxHost.cs (3)
341
get => base.
Font
;
2095
return GetIFontFromFont(richParent.
Font
);
3322
qaContainer.pFont = GetIFontPointerFromFont(GetParentContainer()._parent.
Font
);
System\Windows\Forms\Control.cs (10)
1821
Font currentFont =
Font
;
1983
localFontHeight =
Font
.Height;
2956
oldFont =
Font
;
2977
if (checkFont && !oldFont!.Equals(
Font
))
4156
Font oldFont =
Font
;
4187
if (!oldFont.Equals(
Font
))
5464
/// Gets the control <see cref="
Font
"/>. If the font is inherited, traverse through the parent hierarchy and
5467
/// <param name="fontDpi">Dpi of the control for which <see cref="
Font
"/> is evaluated.</param>
5468
/// <returns>The control's <see cref="
Font
"/></returns>
10690
/// <param name="scaledFont">The scaled <see cref="
Font
"/> value to be set.</param>
System\Windows\Forms\Controls\Buttons\Button.cs (1)
96
Size requiredSize = TextRenderer.MeasureText(Text,
Font
);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (8)
474
g.DrawString(Control.Text, Control.
Font
, highlightBrush, r, stringFormat);
478
g.DrawString(Control.Text, Control.
Font
, shadowBrush, r, stringFormat);
484
g.DrawString(Control.Text, Control.
Font
, brush, r, stringFormat);
496
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, colors.ButtonShadow, formatFlags);
501
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, colors.Highlight, formatFlags);
504
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, colors.ButtonShadow, formatFlags);
509
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, color, formatFlags);
600
Font = Control.
Font
,
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
283
Size textSize = TextRenderer.MeasureText(Text,
Font
);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
254
Size textSize = TextRenderer.MeasureText(Text,
Font
);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (1)
93
? _owningComboBox.
Font
.ToLogicalFont()
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
774
Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString,
Font
, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
785
Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString,
Font
, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
818
using (var hfont = GdiCache.GetHFONTScope(
Font
))
3589
Font
,
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (8)
1524
_dataGridViewState1[State1_AmbientColumnHeadersFont] = value?.Font == base.
Font
;
1545
Font = base.
Font
,
2006
defaultCellStyleTmp.Font = base.
Font
;
2036
_dataGridViewState1[State1_AmbientFont] = value?.Font == base.
Font
;
2057
Font = base.
Font
,
2094
Font = base.
Font
,
2618
get => base.
Font
;
3310
_dataGridViewState1[State1_AmbientRowHeadersFont] = value?.Font == base.
Font
;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
15091
if (_dataGridViewState1[State1_AmbientColumnHeadersFont] && ColumnHeadersDefaultCellStyle.Font != base.
Font
)
15093
ColumnHeadersDefaultCellStyle.Font = base.
Font
;
15099
if (_dataGridViewState1[State1_AmbientRowHeadersFont] && RowHeadersDefaultCellStyle.Font != base.
Font
)
15101
RowHeadersDefaultCellStyle.Font = base.
Font
;
15107
if (_dataGridViewState1[State1_AmbientFont] && DefaultCellStyle.Font != base.
Font
)
15109
DefaultCellStyle.Font = base.
Font
;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
606
Size preferredSize = TextRenderer.MeasureText(comboBox.GetItemText(item), comboBox.
Font
);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
207
get => _calendarFont ??
Font
;
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (12)
150
_fontHeight =
Font
.Height;
151
_cachedFont =
Font
;
153
else if (!ReferenceEquals(_cachedFont,
Font
))
157
_fontHeight =
Font
.Height;
158
_cachedFont =
Font
;
436
Font
,
447
Font
,
486
textSize = Size.Ceiling(graphics.MeasureString(Text,
Font
, textRectangle.Width, format));
490
graphics.DrawString(Text,
Font
, textBrush, textRectangle, format);
494
ControlPaint.DrawStringDisabled(graphics, Text,
Font
, backColor, textRectangle, format);
514
using var hfont = GdiCache.GetHFONTScope(
Font
);
526
Font
,
System\Windows\Forms\Controls\Labels\FocusableLabel.cs (2)
42
Font = new Font(
Font
, FontStyle.Underline);
52
Font = new Font(
Font
, FontStyle.Regular);
System\Windows\Forms\Controls\Labels\Label.cs (9)
929
if (!MeasureTextCache.TextRequiresWordBreak(Text,
Font
, constrainingSize, flags))
1065
using var hfont = GdiCache.GetHFONTScope(
Font
);
1075
requiredSize = MeasureTextCache.GetTextSize(Text,
Font
, proposedConstraints, format);
1086
requiredSize = Size.Ceiling(screen.Graphics.MeasureString(Text,
Font
, bounds, stringFormat));
1123
using var hfont = GdiCache.GetHFONTScope(
Font
);
1286
e.GraphicsInternal.DrawString(Text,
Font
, brush, face, stringFormat);
1290
ControlPaint.DrawStringDisabled(e.GraphicsInternal, Text,
Font
, color, face, stringFormat);
1299
TextRenderer.DrawTextInternal(e, Text,
Font
, face, color, flags: flags);
1307
TextRenderer.DrawTextInternal(e, Text,
Font
, face, disabledTextForeColor, flags: flags);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (9)
530
using Font alwaysUnderlined = new Font(
Font
,
Font
.Style | FontStyle.Underline);
574
using var hfont = GdiCache.GetHFONTScope(
Font
);
1021
LinkUtilities.EnsureLinkFonts(
Font
, LinkBehavior, ref _linkFont, ref _hoverLinkFont);
1071
Size requiredSize = MeasureTextCache.GetTextSize(Text,
Font
, finalRectSize, CreateTextFormatFlags(finalRectSize));
1125
ControlPaint.DrawStringDisabled(g, Text,
Font
, DisabledColor, ClientRectWithPadding, stringFormat);
1140
Font
,
1353
g.DrawString(Text,
Font
, foreBrush, ClientRectWithPadding, stringFormat);
1368
Font
,
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
432
get => base.
Font
;
System\Windows\Forms\Controls\ListView\ListView.cs (5)
229
_odCacheFont =
Font
;
2599
_odCacheFont =
Font
;
5028
rectInvalid.Inflate(1,
Font
.Height + 1);
5475
int textWidth = Size.Ceiling(g.MeasureString(text,
Font
)).Width;
6315
return
Font
.FromHfont(hFont);
System\Windows\Forms\Controls\ListView\ListViewItem.cs (1)
396
return _listView.
Font
;
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
150
return _owner?._listView?.
Font
?? Control.DefaultFont;
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
1192
using (var hfont = GdiCache.GetHFONTScope(
Font
))
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
283
get => base.
Font
;
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
195
get => base.
Font
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
95
int lineHeight = (int)(1.5 *
Font
.Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
301
SizeF sizef = PropertyGrid.MeasureTextHelper.MeasureText(_ownerGrid, g, _detailsButton.Text, _detailsButton.
Font
);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
17
Font = controls[0].
Font
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (4)
90
SizeF sizef = PropertyGrid.MeasureTextHelper.MeasureText(OwnerPropertyGrid, g, _titleLabel.Text,
Font
, width);
132
_lineHeight =
Font
.Height + LogicalToDeviceUnits(2);
232
_titleLabel.Font = new(
Font
, FontStyle.Bold);
238
_lineHeight =
Font
.Height + 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
437
_cachedRowHeight =
Font
.Height + 2;
576
Font =
Font
1071
SizeF sizeF = PropertyGrid.MeasureTextHelper.MeasureText(OwnerGrid, g, gridEntry.PropertyLabel,
Font
);
1302
public Font GetBaseFont() =>
Font
;
1304
public Font GetBoldFont() => _boldFont ??= new Font(
Font
, FontStyle.Bold);
3467
ToolTip.Font =
Font
;
3495
ToolTip.Font =
Font
;
3694
var hFont = (HFONT)
Font
.ToHfont();
4363
EditTextBox.Font =
Font
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
556
Font = _gridView.
Font
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
174
ClientRectangle.Width <= PropertyGridView.SelectedGridEntry.GetValueTextWidth(Text, graphics,
Font
))
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
391
get => base.
Font
;
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
161
get => base.
Font
;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1936
Font
,
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
910
TextRenderer.DrawTextInternal(hdc, PlaceholderText,
Font
, rectangle, SystemColors.GrayText, TextRenderer.DefaultQuality, flags);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
850
Size textSize = TextRenderer.MeasureText(Text,
Font
, proposedConstraints, format);
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
258
int fontHeight = Owner.
Font
.Height;
265
? Owner.
Font
.ToLogicalFont()
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
523
return base.
Font
;
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (1)
191
get => ControlInternal.
Font
;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
97
get => base.
Font
;
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
220
get => base.
Font
;
System\Windows\Forms\Controls\TreeView\TreeView.cs (2)
2828
Size textSize = TextRenderer.MeasureText(node.Text, node.TreeView!.
Font
);
2840
Font font = node.NodeFont ?? node.TreeView.
Font
;
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
516
int width = LayoutUtils.OldGetLargestStringSizeInCollection(
Font
, Items).Width;
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (3)
813
int textWidth = TextRenderer.MeasureText(GetNumberText(testNumber),
Font
).Width;
821
int shortTextWidth = TextRenderer.MeasureText(shortText,
Font
).Width;
850
Size digitSize = TextRenderer.MeasureText(charSpan,
Font
);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1254
get => base.
Font
;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
209
int titleWidth = (int)graphics.MeasureString(title,
Font
).Width;
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (2)
213
textSize = Size.Ceiling(TextRenderer.MeasureText(messageText,
Font
, textSize, TextFormatFlags.WordBreak));
219
textSize = Size.Ceiling(g.MeasureString(messageText,
Font
, textSize.Width));
System\Windows\Forms\Form.cs (3)
447
SizeF real = GetAutoScaleSize(
Font
);
2983
SizeF newVarF = GetAutoScaleSize(
Font
);
4536
Font fontForDpi = GetScaledFont(
Font
, deviceDpiNew, deviceDpiOld);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1400
Font fontForDpi = GetScaledFont(
Font
, deviceDpiNew, deviceDpiOld);
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
611
g.DrawString(message,
Font
, brush, rect, format);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
639
get => base.
Font
;
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
172
get => base.
Font
;
System.Windows.Forms.Design (30)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (6)
190
_listBox.ItemHeight =
Font
.Height + SystemInformation.BorderSize.Width * 2;
215
int w = 4 + charactersInNumber * (
Font
.Height / 2);
567
int w = 4 + charactersInNumber * (
Font
.Height / 2);
608
g.DrawString(e.Index.ToString(CultureInfo.CurrentCulture),
Font
, SystemBrushes.ControlText,
616
g.DrawString(itemText,
Font
, textBrush,
621
int width = offset + (int)g.MeasureString(itemText,
Font
).Width;
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (2)
62
if (_showSplit && !string.IsNullOrEmpty(Text) && TextRenderer.MeasureText(Text,
Font
).Width + PushButtonWidth > preferredSize.Width)
233
TextRenderer.DrawText(pevent, Text,
Font
, bounds, SystemColors.ControlText, formatFlags);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
55
Font = ActionPanel.
Font
340
_dropDownHolder = new DropDownHolder(hostedControl, ActionPanel, borderColor, ActionPanel.
Font
, this);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (2)
70
ButtonRenderer.DrawButton(g, new Rectangle(-1, -1, Width + 2, Height + 2), "…",
Font
, Focused, buttonState);
118
Font
,
System\ComponentModel\Design\DesignerActionPanel.HeaderLine.cs (1)
16
protected override Font GetFont() => new(ActionPanel.
Font
, FontStyle.Bold);
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (2)
94
_titleLabel.Font = new Font(ActionPanel.
Font
, FontStyle.Bold);
95
_subtitleLabel.Font = ActionPanel.
Font
;
System\ComponentModel\Design\DesignerActionPanel.TextLine.cs (2)
52
if (_label.
Font
is not null)
60
return ActionPanel.
Font
;
System\Drawing\Design\ColorEditor.ColorUI.cs (3)
95
_lbSystem.ItemHeight =
Font
.Height + 2;
96
_lbCommon.ItemHeight =
Font
.Height + 2;
259
Font font =
Font
;
System\Windows\Forms\Design\ComponentTray.cs (1)
1963
get => _tray.
Font
;
System\Windows\Forms\Design\ControlDesigner.cs (2)
2259
Control.
Font
.FontFamily,
2260
Math.Max(SystemInformation.ToolWindowCaptionHeight - SystemInformation.BorderSize.Height - 2, Control.
Font
.Height),
System\Windows\Forms\Design\DataGridViewCellStyleBuilder.cs (2)
47
_sampleDataGridViewSelected.Size = new Drawing.Size(100,
Font
.Height + 9);
48
_sampleDataGridView.Size = new Drawing.Size(100,
Font
.Height + 9);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
812
_selectedColumns.ItemHeight =
Font
.Height + OWNERDRAWVERTICALBUFFER;
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1865
TextRenderer.DrawText(e.Graphics, Text,
Font
, rect, ForeColor, formatFlags);
System\Windows\Forms\Design\DesignerUtils.cs (1)
531
using ObjectScope hFont = new(ctrl.
Font
.ToHFONT());
System\Windows\Forms\Design\FormDocumentDesigner.cs (2)
65
SizeF real = Form.GetAutoScaleSize(((Form)Component).
Font
);
268
SizeF newVarF = Form.GetAutoScaleSize(form.
Font
);
System.Windows.Forms.Design.Tests (2)
System\ComponentModel\Design\ByteViewerTests.cs (2)
78
Assert.Equal(Control.DefaultFont, control.
Font
);
79
Assert.Equal(control.
Font
.Height, control.FontHeight);
System.Windows.Forms.Tests (267)
System\Windows\Forms\ButtonBaseTests.cs (2)
68
Assert.Equal(Control.DefaultFont, control.
Font
);
69
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ButtonTests.cs (23)
71
Assert.Equal(Control.DefaultFont, control.
Font
);
72
Assert.Equal(control.
Font
.Height, control.FontHeight);
599
Size newSize = TextRenderer.MeasureText(control.Text, control.
Font
);
674
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
675
Assert.Equal(control.
Font
.Height, control.FontHeight);
680
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
681
Assert.Equal(control.
Font
.Height, control.FontHeight);
696
Size oldSize = TextRenderer.MeasureText(control.Text, control.
Font
);
721
Assert.Same(font1, control.
Font
);
726
Assert.Same(font1, control.
Font
);
732
Assert.Same(font2, control.
Font
);
737
Assert.Equal(Control.DefaultFont, control.
Font
);
743
Assert.Same(font1, control.
Font
);
951
Size oldSize = TextRenderer.MeasureText(control.Text, control.
Font
);
955
Size newSize = TextRenderer.MeasureText("NewText", control.
Font
);
1338
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1362
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1634
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1658
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1682
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1706
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1730
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
1754
Size minSize = TextRenderer.MeasureText(control.Text, control.
Font
);
System\Windows\Forms\CheckBoxTests.cs (2)
72
Assert.Equal(Control.DefaultFont, control.
Font
);
73
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (1)
392
LOGFONTW expected = comboBox.
Font
.ToLogicalFont();
System\Windows\Forms\ComboBoxTests.cs (15)
79
Assert.Equal(Control.DefaultFont, control.
Font
);
80
Assert.Equal(control.
Font
.Height, control.FontHeight);
730
control.TestRaiseOnDrawItem(new DrawItemEventArgs(graphics, control.
Font
, default, 0, DrawItemState.Default));
747
control.TestRaiseOnDrawItem(new DrawItemEventArgs(Graphics.FromImage(bitmap), control.
Font
, default, 0, DrawItemState.Default));
776
control.TestRaiseOnDrawItem(new DrawItemEventArgs(graphics, control.
Font
, default, 0, DrawItemState.Default));
782
control.TestRaiseOnDrawItem(new DrawItemEventArgs(graphics, control.
Font
, default, 0, DrawItemState.Default));
992
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
993
Assert.Equal(control.
Font
.Height, control.FontHeight);
998
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
999
Assert.Equal(control.
Font
.Height, control.FontHeight);
1019
Assert.Same(font1, control.
Font
);
1024
Assert.Same(font1, control.
Font
);
1030
Assert.Same(font2, control.
Font
);
1035
Assert.Equal(Control.DefaultFont, control.
Font
);
1041
Assert.Same(font1, control.
Font
);
System\Windows\Forms\ContainerControlTests.cs (15)
79
Assert.Equal(Control.DefaultFont, control.
Font
);
80
Assert.Equal(control.
Font
.Height, control.FontHeight);
412
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
413
Assert.Equal(control.
Font
.Height, control.FontHeight);
418
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
419
Assert.Equal(control.
Font
.Height, control.FontHeight);
433
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
434
Assert.Equal(control.
Font
.Height, control.FontHeight);
440
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
441
Assert.Equal(control.
Font
.Height, control.FontHeight);
462
Assert.Same(font1, control.
Font
);
467
Assert.Same(font1, control.
Font
);
473
Assert.Same(font2, control.
Font
);
478
Assert.Equal(Control.DefaultFont, control.
Font
);
484
Assert.Same(font1, 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
);
760
Assert.Same(font, control.
Font
);
801
Assert.Equal(Control.DefaultFont, control.
Font
);
919
Assert.Same(font, control.
Font
);
2268
Assert.Equal(Control.DefaultFont, control.
Font
);
2315
Assert.Equal(Control.DefaultFont, control.
Font
);
2354
Assert.Same(font, control.
Font
);
2459
Assert.Equal(Control.DefaultFont, control.
Font
);
2498
Assert.Same(font, control.
Font
);
2592
Assert.Equal(Control.DefaultFont, control.
Font
);
System\Windows\Forms\ControlTests.cs (10)
60
Assert.Equal(Control.DefaultFont, control.
Font
);
61
Assert.Equal(control.
Font
.Height, control.FontHeight);
149
Assert.Equal(Control.DefaultFont, control.
Font
);
150
Assert.Equal(control.
Font
.Height, control.FontHeight);
245
Assert.Equal(Control.DefaultFont, control.
Font
);
246
Assert.Equal(control.
Font
.Height, control.FontHeight);
341
Assert.Equal(Control.DefaultFont, control.
Font
);
342
Assert.Equal(control.
Font
.Height, control.FontHeight);
437
Assert.Equal(Control.DefaultFont, control.
Font
);
438
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ControlTests.Methods.cs (3)
6451
Assert.Equal(Control.DefaultFont, control.
Font
);
6456
Assert.Equal(Control.DefaultFont, control.
Font
);
6460
Assert.Equal(Control.DefaultFont, control.
Font
);
System\Windows\Forms\ControlTests.Properties.cs (78)
4807
Assert.Same(font1, control.
Font
);
4811
Assert.Same(font2, control.
Font
);
4827
Assert.Equal(Control.DefaultFont, control.
Font
);
4831
Assert.Same(font2, control.
Font
);
4842
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4843
Assert.Equal(control.
Font
.Height, control.FontHeight);
4848
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4849
Assert.Equal(control.
Font
.Height, control.FontHeight);
4869
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4875
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4898
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4904
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4919
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4920
Assert.Equal(control.
Font
.Height, control.FontHeight);
4925
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4926
Assert.Equal(control.
Font
.Height, control.FontHeight);
4956
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4957
Assert.Equal(control.
Font
.Height, control.FontHeight);
4965
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
4966
Assert.Equal(control.
Font
.Height, control.FontHeight);
5002
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
5003
Assert.Equal(control.
Font
.Height, control.FontHeight);
5011
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
5012
Assert.Equal(control.
Font
.Height, control.FontHeight);
5035
Assert.Same(font1, control.
Font
);
5040
Assert.Same(font1, control.
Font
);
5046
Assert.Same(font2, control.
Font
);
5051
Assert.Equal(Control.DefaultFont, control.
Font
);
5057
Assert.Same(font1, control.
Font
);
5098
Assert.Same(font1, control.
Font
);
5099
Assert.Same(font1, child1.
Font
);
5100
Assert.Same(font1, child2.
Font
);
5107
Assert.Same(font1, control.
Font
);
5108
Assert.Same(font1, child1.
Font
);
5109
Assert.Same(font1, child2.
Font
);
5117
Assert.Same(font2, control.
Font
);
5118
Assert.Same(font2, child1.
Font
);
5119
Assert.Same(font2, child2.
Font
);
5126
Assert.Equal(Control.DefaultFont, control.
Font
);
5127
Assert.Equal(Control.DefaultFont, child1.
Font
);
5128
Assert.Equal(Control.DefaultFont, child2.
Font
);
5138
Assert.Same(font1, control.
Font
);
5139
Assert.Same(font1, child1.
Font
);
5140
Assert.Same(font1, child2.
Font
);
5191
Assert.Same(font1, control.
Font
);
5192
Assert.Same(childFont1, child1.
Font
);
5193
Assert.Same(childFont2, child2.
Font
);
5200
Assert.Same(font1, control.
Font
);
5201
Assert.Same(childFont1, child1.
Font
);
5202
Assert.Same(childFont2, child2.
Font
);
5210
Assert.Same(font2, control.
Font
);
5211
Assert.Same(childFont1, child1.
Font
);
5212
Assert.Same(childFont2, child2.
Font
);
5219
Assert.Equal(Control.DefaultFont, control.
Font
);
5220
Assert.Same(childFont1, child1.
Font
);
5221
Assert.Same(childFont2, child2.
Font
);
5231
Assert.Same(font1, control.
Font
);
5232
Assert.Same(childFont1, child1.
Font
);
5233
Assert.Same(childFont2, child2.
Font
);
5242
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.
Font
)];
5248
Assert.Same(font, control.
Font
);
5252
Assert.Equal(Control.DefaultFont, control.
Font
);
5256
Assert.Same(font, control.
Font
);
5260
Assert.Equal(Control.DefaultFont, control.
Font
);
5267
PropertyDescriptor property = TypeDescriptor.GetProperties(typeof(Control))[nameof(Control.
Font
)];
5273
Assert.Same(font, control.
Font
);
5277
Assert.Equal(Control.DefaultFont, control.
Font
);
5281
Assert.Same(font, control.
Font
);
5285
Assert.Equal(Control.DefaultFont, control.
Font
);
10814
Assert.Same(font1, control.
Font
);
10830
Assert.Same(font1, control.
Font
);
10846
Assert.Same(font1, control.
Font
);
10862
Assert.Same(font2, control.
Font
);
10878
Assert.Equal(Control.DefaultFont, control.
Font
);
10996
Assert.Same(controlFont, control.
Font
);
11012
Assert.Same(controlFont, control.
Font
);
11028
Assert.Same(controlFont, control.
Font
);
11044
Assert.Same(controlFont, control.
Font
);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (4)
76
Assert.Equal(Control.DefaultFont, control.
Font
);
77
Assert.Equal(control.
Font
.Height, control.FontHeight);
744
Assert.Equal(expectedFont ?? Control.DefaultFont, control.
Font
);
955
Assert.Equal(expectedFont ?? Control.DefaultFont, control.
Font
);
System\Windows\Forms\DateTimePickerTests.cs (3)
76
Assert.Equal(Control.DefaultFont, control.
Font
);
77
Assert.Equal(control.
Font
.Height, control.FontHeight);
297
_dateTimePicker.CalendarFont.Should().Be(_dateTimePicker.
Font
);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (2)
92
Assert.Equal(Control.DefaultFont, control.
Font
);
93
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (2)
76
Assert.Equal(Control.DefaultFont, control.
Font
);
77
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\DomainUpDownTests.cs (2)
98
_sub.
Font
.Should().Be(Control.DefaultFont);
99
_sub.FontHeight.Should().Be(_sub.
Font
.Height);
System\Windows\Forms\FlowLayoutPanelTests.cs (2)
73
Assert.Equal(Control.DefaultFont, control.
Font
);
74
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\FormTests.cs (2)
94
Assert.Equal(Control.DefaultFont, control.
Font
);
95
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\GroupBoxTests.cs (3)
64
Assert.Equal(Control.DefaultFont, control.
Font
);
65
Assert.Equal(control.
Font
.Height, control.FontHeight);
603
var originalFont = groupBox.
Font
;
System\Windows\Forms\LabelTests.cs (2)
64
Assert.Equal(Control.DefaultFont, control.
Font
);
65
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ListControlTests.cs (2)
67
Assert.Equal(Control.DefaultFont, control.
Font
);
68
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ListViewTests.cs (2)
79
Assert.Equal(Control.DefaultFont, control.
Font
);
80
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\MdiClientTests.cs (1)
50
Assert.Equal(Control.DefaultFont, control.
Font
);
System\Windows\Forms\MonthCalendarTests.cs (2)
81
Assert.Equal(Control.DefaultFont, control.
Font
);
82
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\PanelTests.cs (2)
73
Assert.Equal(Control.DefaultFont, control.
Font
);
74
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\PropertyGridTests.cs (2)
102
Assert.Equal(Control.DefaultFont, control.
Font
);
103
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\RadioButtonTests.cs (2)
71
Assert.Equal(Control.DefaultFont, control.
Font
);
72
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ScrollableControlTests.cs (2)
72
Assert.Equal(Control.DefaultFont, control.
Font
);
73
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\SplitterPanelTests.cs (1)
66
Assert.Equal(Control.DefaultFont, control.
Font
);
System\Windows\Forms\TabControlTests.cs (2)
64
Assert.Equal(Control.DefaultFont, control.
Font
);
65
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\TableLayoutPanelTests.cs (2)
78
Assert.Equal(Control.DefaultFont, control.
Font
);
79
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\TabPageTests.cs (4)
78
Assert.Equal(Control.DefaultFont, control.
Font
);
79
Assert.Equal(control.
Font
.Height, control.FontHeight);
187
Assert.Equal(Control.DefaultFont, control.
Font
);
188
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (1)
365
LOGFONTW expected = textBoxBase.
Font
.ToLogicalFont();
System\Windows\Forms\ToolStripContentPanelTests.cs (2)
75
Assert.Equal(Control.DefaultFont, control.
Font
);
76
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ToolStripControlHostTests.cs (4)
85
Assert.Same(c.
Font
, item.Font);
617
Assert.Same(value, c.
Font
);
974
Assert.Equal(value ?? Control.DefaultFont, c.
Font
);
980
Assert.Equal(value ?? Control.DefaultFont, c.
Font
);
System\Windows\Forms\ToolStripPanelTests.cs (2)
75
Assert.Equal(Control.DefaultFont, control.
Font
);
76
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\ToolStripTests.cs (3)
1636
Assert.Same(form.
Font
, toolStrip1.Font);
1637
Assert.Same(form.
Font
, item1.Font);
1638
Assert.Same(form.
Font
, item2.Font);
System\Windows\Forms\TreeViewTests.cs (2)
65
Assert.Equal(Control.DefaultFont, control.
Font
);
66
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\UpDownBaseTests.cs (2)
85
Assert.Equal(Control.DefaultFont, control.
Font
);
86
Assert.Equal(control.
Font
.Height, control.FontHeight);
System\Windows\Forms\UserControlTests.cs (2)
79
Assert.Equal(Control.DefaultFont, control.
Font
);
80
Assert.Equal(control.
Font
.Height, control.FontHeight);
TextBoxBaseTests.cs (40)
875
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
876
Assert.Equal(control.
Font
.Height, control.FontHeight);
881
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
882
Assert.Equal(control.
Font
.Height, control.FontHeight);
895
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
896
Assert.Equal(control.
Font
.Height, control.FontHeight);
901
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
902
Assert.Equal(control.
Font
.Height, control.FontHeight);
917
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
918
Assert.Equal(control.
Font
.Height, control.FontHeight);
923
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
924
Assert.Equal(control.
Font
.Height, control.FontHeight);
940
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
941
Assert.Equal(control.
Font
.Height, control.FontHeight);
946
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
947
Assert.Equal(control.
Font
.Height, control.FontHeight);
977
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
978
Assert.Equal(control.
Font
.Height, control.FontHeight);
986
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
987
Assert.Equal(control.
Font
.Height, control.FontHeight);
1014
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
1015
Assert.Equal(control.
Font
.Height, control.FontHeight);
1023
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
1024
Assert.Equal(control.
Font
.Height, control.FontHeight);
1061
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
1062
Assert.Equal(control.
Font
.Height, control.FontHeight);
1070
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
1071
Assert.Equal(control.
Font
.Height, control.FontHeight);
1100
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
1101
Assert.Equal(control.
Font
.Height, control.FontHeight);
1109
Assert.Equal(value ?? Control.DefaultFont, control.
Font
);
1110
Assert.Equal(control.
Font
.Height, control.FontHeight);
1133
Assert.Same(font1, control.
Font
);
1138
Assert.Same(font1, control.
Font
);
1144
Assert.Same(font2, control.
Font
);
1149
Assert.Equal(Control.DefaultFont, control.
Font
);
1155
Assert.Same(font1, control.
Font
);
5085
int width = TextRenderer.MeasureText(control.Text, control.
Font
).Width;
5105
int width = TextRenderer.MeasureText(control.Text, control.
Font
).Width;
5128
int width = TextRenderer.MeasureText(control.Text, control.
Font
, Size.Empty, TextFormatFlags.SingleLine).Width;
TextBoxTests.cs (2)
70
Assert.Equal(Control.DefaultFont, control.
Font
);
71
Assert.Equal(control.
Font
.Height, control.FontHeight);
System.Windows.Forms.UI.IntegrationTests (18)
DesignBehaviorsTests.cs (1)
327
pe.Graphics.DrawString($"Design time \n{Control.Site?.Name} !", Control.
Font
, SystemBrushes.WindowText, new PointF(12, 12));
Dpi\FormDpiTests.cs (2)
35
float initialFontSize = form.
Font
.Size;
43
Assert.NotEqual(initialFontSize, form.
Font
.Size);
PropertyGridInternal\DropDownButton.DropDownButtonAccessibleObjectTests.cs (1)
63
grid.SelectedEntry = grid[nameof(Button.
Font
)];
PropertyGridInternal\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObjectTests.cs (13)
23
GridEntry entry = grid[nameof(Button.
Font
)];
39
GridEntry entry = grid[nameof(Button.
Font
)];
53
GridEntry entry = grid[nameof(Button.
Font
)];
85
grid.SelectedEntry = grid[nameof(Button.
Font
)];
101
GridEntry entry = grid[nameof(Button.
Font
)];
115
GridEntry entry = grid[nameof(Button.
Font
)];
131
Assert.Null(grid[nameof(Button.
Font
)].AccessibilityObject.FragmentNavigate(NavigateDirection.NavigateDirection_FirstChild));
142
GridEntry entry = grid[nameof(Button.
Font
)];
158
GridEntry entry = grid[nameof(Button.
Font
)];
204
Assert.Null(grid[nameof(Button.
Font
)].AccessibilityObject.FragmentNavigate(NavigateDirection.NavigateDirection_LastChild));
215
GridEntry entry = grid[nameof(Button.
Font
)];
231
GridEntry entry = grid[nameof(Button.
Font
)];
275
grid.SelectedEntry = grid[nameof(Button.
Font
)];
PropertyGridInternal\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (1)
108
grid.SelectedEntry = grid[nameof(Button.
Font
)];
WindowsFormsIntegration (3)
System\Windows\Integration\ElementHost.cs (1)
944
OnPropertyChanged("Font", this.
Font
);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (2)
141
adapter.Font = new SD.Font(familySource, adapter.
Font
.Size, adapter.
Font
.Style);
WinFormsControlsTest (3)
ScalingBeforeChanges.cs (3)
100
Font = new Font(
Font
.FontFamily,
Font
.Size * factorY,
Font
.Style);