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