15 overrides of Font
System.Windows.Forms (14)
System\Windows\Forms\ActiveX\AxHost.cs (1)
339
public override Font
Font
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2623
public override Font
Font
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
428
public override Font
Font
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
278
public override Font
Font
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
200
public override Font
Font
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
418
public override Font
Font
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
156
public override Font
Font
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
516
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)
216
public override Font
Font
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBar.cs (1)
71
public override Drawing.Font
Font
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1246
public override Font
Font
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
637
public override Font
Font
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
163
public override Font
Font
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ComponentTray.cs (1)
1943
public override Font
Font
55 writes to Font
PresentationUI (9)
MS\Internal\Documents\DialogBaseForm.cs (1)
102
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
Font
= columnHeaderFont,
247
Font
= columnHeaderFont,
258
Font
= columnHeaderFont,
269
Font
= columnHeaderFont,
288
Font
= columnHeaderFont,
299
Font
= columnHeaderFont,
MS\Internal\Documents\SigningDialog.cs (1)
261
_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)
9894
Font
= null;
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
2626
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)
433
base.
Font
= value;
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
281
set => base.
Font
= value;
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
203
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)
599
Font
= Font
3505
ToolTip.
Font
= Font;
3533
ToolTip.
Font
= Font;
4394
EditTextBox.
Font
= GetBoldFont();
4398
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)
425
base.
Font
= value;
431
base.
Font
= null;
445
base.
Font
= GetCharFormatFont(selectionOnly: false);
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
159
set => base.
Font
= value;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
532
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)
219
set => base.
Font
= value;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1249
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)
166
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)
154
Font
= (Font)uiService.Styles["DialogFont"];
1410
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)
799
Font
= uiFont;
WindowsFormsIntegration (4)
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (4)
140
adapter.
Font
= new SD.Font(familySource, adapter.Font.Size, adapter.Font.Style);
171
adapter.
Font
= new SD.Font(CurrentFontFamily, CurrentFontSize, style);
192
adapter.
Font
= new SD.Font(CurrentFontFamily, CurrentFontSize, style);
208
adapter.
Font
= new SD.Font(CurrentFontFamily, (float)pointSize, CurrentFontStyle);
205 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)
228
Font columnHeaderFont = new System.Drawing.Font(
Font
, System.Drawing.FontStyle.Bold);
System.Windows.Forms (162)
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
;
2092
return GetIFontFromFont(richParent.
Font
);
3319
qaContainer.pFont = GetIFontPointerFromFont(GetParentContainer()._parent.
Font
);
System\Windows\Forms\Control.cs (10)
2087
Font currentFont =
Font
;
2249
localFontHeight =
Font
.Height;
3222
oldFont =
Font
;
3243
if (checkFont && !oldFont!.Equals(
Font
))
4453
Font oldFont =
Font
;
4485
if (!oldFont.Equals(
Font
))
5775
/// Gets the control <see cref="
Font
"/>. If the font is inherited, traverse through the parent hierarchy and
5778
/// <param name="fontDpi">Dpi of the control for which <see cref="
Font
"/> is evaluated.</param>
5779
/// <returns>The control's <see cref="
Font
"/></returns>
11527
/// <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)
536
g.DrawString(Control.Text, Control.
Font
, highlightBrush, r, stringFormat);
540
g.DrawString(Control.Text, Control.
Font
, shadowBrush, r, stringFormat);
546
g.DrawString(Control.Text, Control.
Font
, brush, r, stringFormat);
558
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, colors.ButtonShadow, formatFlags);
563
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, colors.Highlight, formatFlags);
566
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, colors.ButtonShadow, formatFlags);
571
TextRenderer.DrawTextInternal(e, Control.Text, Control.
Font
, r, color, formatFlags);
692
Font = Control.
Font
,
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (1)
67
(int)(Control.
Font
.Height * 0.9f));
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (1)
66
(int)(Control.
Font
.Height * 0.9f));
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
373
Size textSize = TextRenderer.MeasureText(Text,
Font
);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
302
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 (5)
852
Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString,
Font
, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
863
Size textSize = TextRenderer.MeasureText(LayoutUtils.TestString,
Font
, new Size(short.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
895
using (var hfont = GdiCache.GetHFONTScope(
Font
))
3682
Font
,
4061
Font
,
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (1)
337
comboBox.
Font
,
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (8)
1530
_dataGridViewState1[State1_AmbientColumnHeadersFont] = value?.Font == base.
Font
;
1551
Font = base.
Font
,
2013
defaultCellStyleTmp.Font = base.
Font
;
2043
_dataGridViewState1[State1_AmbientFont] = value?.Font == base.
Font
;
2064
Font = base.
Font
,
2101
Font = base.
Font
,
2625
get => base.
Font
;
3317
_dataGridViewState1[State1_AmbientRowHeadersFont] = value?.Font == base.
Font
;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
15085
if (_dataGridViewState1[State1_AmbientColumnHeadersFont] && ColumnHeadersDefaultCellStyle.Font != base.
Font
)
15087
ColumnHeadersDefaultCellStyle.Font = base.
Font
;
15093
if (_dataGridViewState1[State1_AmbientRowHeadersFont] && RowHeadersDefaultCellStyle.Font != base.
Font
)
15095
RowHeadersDefaultCellStyle.Font = base.
Font
;
15101
if (_dataGridViewState1[State1_AmbientFont] && DefaultCellStyle.Font != base.
Font
)
15103
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)
155
_fontHeight =
Font
.Height;
156
_cachedFont =
Font
;
158
else if (!ReferenceEquals(_cachedFont,
Font
))
162
_fontHeight =
Font
.Height;
163
_cachedFont =
Font
;
465
Font
,
476
Font
,
514
textSize = Size.Ceiling(graphics.MeasureString(Text,
Font
, textRectangle.Width, format));
518
graphics.DrawString(Text,
Font
, textBrush, textRectangle, format);
522
ControlPaint.DrawStringDisabled(graphics, Text,
Font
, backColor, textRectangle, format);
542
using var hfont = GdiCache.GetHFONTScope(
Font
);
554
Font
,
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (14)
40
|| !ReferenceEquals(_modernCaptionSourceFont,
Font
)
48
_modernCaptionSourceFont =
Font
;
531
string semiBoldFamilyName =
Font
.Style == FontStyle.Regular
533
Font
.FontFamily.Name,
540
Font
.FontFamily,
541
Font
.Size * styleScale * textScale,
542
Font
.Style,
543
Font
.Unit,
544
Font
.GdiCharSet,
545
Font
.GdiVerticalFont);
551
Font
.Size * styleScale * textScale,
553
Font
.Unit,
554
Font
.GdiCharSet,
555
Font
.GdiVerticalFont);
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)
927
if (!MeasureTextCache.TextRequiresWordBreak(Text,
Font
, constrainingSize, flags))
1063
using var hfont = GdiCache.GetHFONTScope(
Font
);
1073
requiredSize = MeasureTextCache.GetTextSize(Text,
Font
, proposedConstraints, format);
1084
requiredSize = Size.Ceiling(screen.Graphics.MeasureString(Text,
Font
, bounds, stringFormat));
1121
using var hfont = GdiCache.GetHFONTScope(
Font
);
1284
e.GraphicsInternal.DrawString(Text,
Font
, brush, face, stringFormat);
1288
ControlPaint.DrawStringDisabled(e.GraphicsInternal, Text,
Font
, color, face, stringFormat);
1297
TextRenderer.DrawTextInternal(e, Text,
Font
, face, color, flags: flags);
1305
TextRenderer.DrawTextInternal(e, Text,
Font
, face, disabledTextForeColor, flags: flags);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (9)
545
using Font alwaysUnderlined = new Font(
Font
,
Font
.Style | FontStyle.Underline);
589
using var hfont = GdiCache.GetHFONTScope(
Font
);
1031
LinkUtilities.EnsureLinkFonts(
Font
, LinkBehavior, ref _linkFont, ref _hoverLinkFont);
1081
Size requiredSize = MeasureTextCache.GetTextSize(Text,
Font
, finalRectSize, CreateTextFormatFlags(finalRectSize));
1135
ControlPaint.DrawStringDisabled(g, Text,
Font
, DisabledColor, ClientRectWithPadding, stringFormat);
1150
Font
,
1363
g.DrawString(Text,
Font
, foreBrush, ClientRectWithPadding, stringFormat);
1378
Font
,
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
430
get => base.
Font
;
System\Windows\Forms\Controls\ListView\ListView.cs (4)
229
_odCacheFont =
Font
;
2609
_odCacheFont =
Font
;
5076
rectInvalid.Inflate(1,
Font
.Height + 1);
5523
int textWidth = Size.Ceiling(g.MeasureString(text,
Font
)).Width;
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)
1187
using (var hfont = GdiCache.GetHFONTScope(
Font
))
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
280
get => base.
Font
;
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
202
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)
92
SizeF sizef = PropertyGrid.MeasureTextHelper.MeasureText(OwnerPropertyGrid, g, _titleLabel.Text,
Font
, width);
134
_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)
460
_cachedRowHeight =
Font
.Height + 2;
599
Font =
Font
1094
SizeF sizeF = PropertyGrid.MeasureTextHelper.MeasureText(OwnerGrid, g, gridEntry.PropertyLabel,
Font
);
1325
public Font GetBaseFont() =>
Font
;
1327
public Font GetBoldFont() => _boldFont ??= new Font(
Font
, FontStyle.Bold);
3505
ToolTip.Font =
Font
;
3533
ToolTip.Font =
Font
;
3732
var hFont = (HFONT)
Font
.ToHfont();
4398
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)
420
get => base.
Font
;
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
158
get => base.
Font
;
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
1968
Font
,
System\Windows\Forms\Controls\TextBox\TextBox.cs (1)
937
TextRenderer.DrawTextInternal(hdc, PlaceholderText,
Font
, rectangle, SystemColors.GrayText, TextRenderer.DefaultQuality, flags);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
1116
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)
522
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)
218
get => base.
Font
;
System\Windows\Forms\Controls\TreeView\TreeView.cs (6)
796
/// Gets or sets the per-node vertical leading factor applied on top of the live <see cref="Control.
Font
"/> height.
811
/// <see cref="Control.
Font
"/> height with <c>TVS_NONEVENHEIGHT</c> enabled. Other positive values scale the
815
/// The factor is dimensionless. The resulting pixels scale with <see cref="Control.
Font
"/>, whose height already
2582
double itemHeight = Math.Ceiling(NodeLeading *
Font
.Height);
3031
Size textSize = TextRenderer.MeasureText(node.Text, node.TreeView!.
Font
);
3043
Font font = node.NodeFont ?? node.TreeView.
Font
;
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
518
int width = LayoutUtils.OldGetLargestStringSizeInCollection(
Font
, Items).Width;
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (3)
815
int textWidth = TextRenderer.MeasureText(GetNumberText(testNumber),
Font
).Width;
823
int shortTextWidth = TextRenderer.MeasureText(shortText,
Font
).Width;
852
Size digitSize = TextRenderer.MeasureText(charSpan,
Font
);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1248
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)
446
SizeF real = GetAutoScaleSize(
Font
);
3046
SizeF newVarF = GetAutoScaleSize(
Font
);
4593
Font fontForDpi = GetScaledFont(
Font
, deviceDpiNew, deviceDpiOld);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1393
Font fontForDpi = GetScaledFont(
Font
, deviceDpiNew, deviceDpiOld);
System\Windows\Forms\Printing\PrintPreviewControl.cs (1)
617
g.DrawString(message,
Font
, brush, rect, format);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
639
get => base.
Font
;
System\Windows\Forms\Rendering\Button\AnimatedPopupButtonRenderer.cs (1)
156
Font = button.
Font
,
System\Windows\Forms\Rendering\CheckBox\AnimatedToggleSwitchRenderer.cs (5)
80
Size textSize = TextRenderer.MeasureText(Control.Text, Control.
Font
);
156
TextRenderer.MeasureText(control.Text, control.
Font
));
180
Control.
Font
,
404
(int)(control.
Font
.Height * 0.9f));
439
Size textSize = TextRenderer.MeasureText(control.Text, control.
Font
);
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
165
get => base.
Font
;
System.Windows.Forms.Design (38)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (6)
204
_listBox.ItemHeight =
Font
.Height + SystemInformation.BorderSize.Width * 2;
229
int w = 4 + charactersInNumber * (
Font
.Height / 2);
581
int w = 4 + charactersInNumber * (
Font
.Height / 2);
622
g.DrawString(e.Index.ToString(CultureInfo.CurrentCulture),
Font
, SystemBrushes.ControlText,
630
g.DrawString(itemText,
Font
, textBrush,
635
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
337
_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)
1945
get => _tray.
Font
;
System\Windows\Forms\Design\ControlDesigner.cs (2)
2274
Control.
Font
.FontFamily,
2275
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)
809
_selectedColumns.ItemHeight =
Font
.Height + OWNERDRAWVERTICALBUFFER;
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
1859
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\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (8)
437
_newItemTypes.ItemHeight = Math.Max(s_iconHeight,
Font
.Height);
548
+ g.MeasureString(item.Type.Name, _newItemTypes.
Font
).Width + GdiPlusExtraSpace);
549
dropDownHeight += (
Font
.Height + s_separatorHeight) + 2 * s_imagePaddingY;
636
Font measureFont =
Font
;
781
TextRenderer.DrawText(e.Graphics, itemText,
Font
, textBounds, textColor, format);
864
using Font boldFont = new(_selectedItemName.
Font
, FontStyle.Bold);
893
int itemTextWidth = (int)e.Graphics.MeasureString(itemName, _selectedItemName.
Font
).Width;
903
TextRenderer.DrawText(e.Graphics, itemName, _selectedItemName.
Font
, textRect, SystemColors.WindowText, flags);
WindowsFormsIntegration (3)
System\Windows\Integration\ElementHost.cs (1)
935
OnPropertyChanged("Font", this.
Font
);
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (2)
140
adapter.Font = new SD.Font(familySource, adapter.
Font
.Size, adapter.
Font
.Style);