392 references to SystemFonts
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
HasValidFonts.vb (1)
17
Dim result =
SystemFonts
.DefaultFont
PresentationUI (3)
MS\Internal\Documents\DialogBaseForm.cs (1)
103
c.Font = System.Drawing.
SystemFonts
.DialogFont;
MS\Internal\Documents\SigningDialog.cs (2)
264
_signerlabel.Font = new Font(System.Drawing.
SystemFonts
.DialogFont, System.Drawing.
SystemFonts
.DialogFont.Style | FontStyle.Bold);
System.Drawing (1)
System.Drawing.cs (1)
156
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.
SystemFonts
))]
System.Drawing.Common.Tests (20)
System\Drawing\FontTests.cs (4)
717
Assert.Equal(
SystemFonts
.DefaultFont.GdiCharSet <= 2 ? font.GdiCharSet :
SystemFonts
.DefaultFont.GdiCharSet, logFont.lfCharSet);
751
Assert.Equal(
SystemFonts
.DefaultFont.GdiCharSet <= 2 ? font.GdiCharSet :
SystemFonts
.DefaultFont.GdiCharSet, logFont.lfCharSet);
System\Drawing\GraphicsTests.cs (2)
2784
graphics.DrawString("Test text",
SystemFonts
.DefaultFont, Brushes.White, default(Point));
2796
() => graphics.DrawString("Test text",
SystemFonts
.DefaultFont, Brushes.White, default(Point)));
System\Drawing\SystemFontsTests.cs (14)
12
yield return new object[] { () =>
SystemFonts
.CaptionFont };
13
yield return new object[] { () =>
SystemFonts
.IconTitleFont };
14
yield return new object[] { () =>
SystemFonts
.MenuFont };
15
yield return new object[] { () =>
SystemFonts
.MessageBoxFont };
16
yield return new object[] { () =>
SystemFonts
.SmallCaptionFont };
17
yield return new object[] { () =>
SystemFonts
.StatusFont };
79
using Font fontFromName =
SystemFonts
.GetFontByName(systemFontName);
99
Assert.Null(
SystemFonts
.GetFontByName(systemFontName));
130
new object[] { () =>
SystemFonts
.CaptionFont, nameof(CaptionFont), CaptionFont},
131
[(() =>
SystemFonts
.IconTitleFont), nameof(IconTitleFont), IconTitleFont],
132
[(() =>
SystemFonts
.MenuFont), nameof(MenuFont), MenuFont],
133
[(() =>
SystemFonts
.MessageBoxFont), nameof(MessageBoxFont), MessageBoxFont],
134
[(() =>
SystemFonts
.SmallCaptionFont), nameof(SmallCaptionFont), SmallCaptionFont],
135
[(() =>
SystemFonts
.StatusFont), nameof(StatusFont), StatusFont]
System.Windows.Forms (6)
System\Windows\Forms\Application.cs (1)
1388
Font newSystemFont =
SystemFonts
.GetFontByName(s_defaultFont.SystemFontName)!;
System\Windows\Forms\Control.cs (2)
1565
s_defaultFont = Application.DefaultFont ??
SystemFonts
.MessageBoxFont;
12492
Font font =
SystemFonts
.MessageBoxFont!;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
103
sysFont =
SystemFonts
.MenuFont;
System\Windows\Forms\Help\Help.cs (2)
88
Font font =
SystemFonts
.StatusFont ??
SystemFonts
.DefaultFont;
System.Windows.Forms.Primitives.Tests (5)
Interop\User32\SystemParametersInfoWTests.cs (5)
19
AreEqual(
SystemFonts
.CaptionFont!, captionFont);
22
AreEqual(
SystemFonts
.CaptionFont!, menuFont);
25
AreEqual(
SystemFonts
.MessageBoxFont!, messageFont);
28
AreEqual(
SystemFonts
.SmallCaptionFont!, smCaptionFont);
31
AreEqual(
SystemFonts
.StatusFont!, statusFont);
System.Windows.Forms.Tests (354)
System\Windows\Forms\ApplicationTests.cs (3)
197
Font customFont = (Font)
SystemFonts
.CaptionFont.Clone();
251
Assert.Throws<InvalidOperationException>(() => Application.SetDefaultFont(
SystemFonts
.CaptionFont));
270
using Font sysFont =
SystemFonts
.CaptionFont;
System\Windows\Forms\ButtonTests.cs (1)
730
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\CheckBoxRendererTests.cs (7)
31
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, false, cBState);
68
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, false, cBState);
78
State.FontFace(
SystemFonts
.DefaultFont.Name)
105
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, textFormat, false, cBState);
115
State.FontFace(
SystemFonts
.DefaultFont.Name)
139
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, TextFormatFlags.Default, focus, cBState, HWND.Null);
149
State.FontFace(
SystemFonts
.DefaultFont.Name)
System\Windows\Forms\ComboBoxTests.cs (1)
1028
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ContainerControlTests.cs (1)
471
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ControlPaintTests.cs (18)
1900
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), null };
1901
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, RectangleF.Empty, new StringFormat() };
1902
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, -3, -4), new StringFormat() };
1903
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat() };
1904
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Black, new RectangleF(1, 2, 3, 4), new StringFormat() };
1905
yield return new object[] { s,
SystemFonts
.MenuFont, Color.White, new RectangleF(1, 2, 3, 4), new StringFormat() };
1906
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Transparent, new RectangleF(1, 2, 3, 4), new StringFormat() };
1907
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Empty, new RectangleF(1, 2, 3, 4), new StringFormat() };
1941
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat()));
1948
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default };
1949
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, Rectangle.Empty, TextFormatFlags.VerticalCenter };
1950
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, -3, -4), TextFormatFlags.VerticalCenter };
1951
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1952
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Black, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1953
yield return new object[] { s,
SystemFonts
.MenuFont, Color.White, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1954
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Transparent, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1955
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Empty, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1977
Assert.Throws<ArgumentNullException>("dc", () => ControlPaint.DrawStringDisabled(null, s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default));
System\Windows\Forms\ControlTests.cs (1)
494
Assert.Equal(
SystemFonts
.MessageBoxFont, Control.DefaultFont);
System\Windows\Forms\ControlTests.Properties.cs (8)
5044
using var font2 =
SystemFonts
.DialogFont;
5115
using var font2 =
SystemFonts
.DialogFont;
5208
using var font2 =
SystemFonts
.DialogFont;
10718
Font font1 =
SystemFonts
.CaptionFont;
10719
Font font2 =
SystemFonts
.DialogFont;
10892
Font font1 =
SystemFonts
.MenuFont;
10893
Font font2 =
SystemFonts
.DialogFont;
10954
Font controlFont =
SystemFonts
.StatusFont;
System\Windows\Forms\DataGridViewCellStyleTests.cs (17)
45
Font =
SystemFonts
.DefaultFont,
62
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
261
yield return new object[] {
SystemFonts
.DefaultFont };
284
Font =
SystemFonts
.DefaultFont
623
Font =
SystemFonts
.DefaultFont,
641
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
666
Font =
SystemFonts
.DefaultFont,
683
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
714
Font =
SystemFonts
.DefaultFont,
731
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
781
Font =
SystemFonts
.DefaultFont,
798
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
841
Font font =
SystemFonts
.DefaultFont;
915
new DataGridViewCellStyle { Font =
SystemFonts
.MenuFont },
1073
new DataGridViewCellStyle { Font =
SystemFonts
.DefaultFont },
1074
$"DataGridViewCellStyle {{ Font={
SystemFonts
.DefaultFont} }}"
1122
Font font =
SystemFonts
.DefaultFont;
System\Windows\Forms\DataGridViewCellTests.cs (24)
5254
int height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default);
5257
height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default, out bool widthTruncated);
5269
int height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 20, TextFormatFlags.Default);
5272
height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 20, TextFormatFlags.Default, out bool widthTruncated);
5281
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text",
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default));
5282
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text",
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default, out widthTruncated));
5305
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, maxWidth, TextFormatFlags.Default));
5306
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, maxWidth, TextFormatFlags.Default, out widthTruncated));
5317
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, 10, flags));
5318
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, 10, flags, out widthTruncated));
5328
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text,
SystemFonts
.DefaultFont, 0.2f, TextFormatFlags.Default));
5342
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text,
SystemFonts
.DefaultFont, 0.2f, flags));
5348
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text",
SystemFonts
.DefaultFont, 0.2f, TextFormatFlags.Default));
5366
Assert.Throws<ArgumentOutOfRangeException>("maxRatio", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text",
SystemFonts
.DefaultFont, maxRatio, TextFormatFlags.Default));
5375
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text",
SystemFonts
.DefaultFont, 0.2f, flags));
5384
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text,
SystemFonts
.DefaultFont, TextFormatFlags.Default));
5398
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text,
SystemFonts
.DefaultFont, flags));
5404
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text",
SystemFonts
.DefaultFont, TextFormatFlags.Default));
5421
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text",
SystemFonts
.DefaultFont, flags));
5430
Assert.Equal(0, DataGridViewCell.MeasureTextWidth(graphics, text,
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default));
5444
Assert.NotEqual(0, DataGridViewCell.MeasureTextWidth(graphics, text,
SystemFonts
.DefaultFont, 10, flags));
5450
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text",
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default));
5468
Assert.Throws<ArgumentOutOfRangeException>("maxHeight", () => DataGridViewCell.MeasureTextWidth(graphics, "text",
SystemFonts
.DefaultFont, maxHeight, TextFormatFlags.Default));
5477
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text",
SystemFonts
.DefaultFont, 10, flags));
System\Windows\Forms\DataGridViewRowTests.cs (2)
2056
Font font1 =
SystemFonts
.DefaultFont;
2057
Font font2 =
SystemFonts
.MenuFont;
System\Windows\Forms\DrawItemEventArgsTests.cs (12)
14
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.WindowText, SystemColors.Window };
15
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight };
16
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.WindowText, SystemColors.Window };
17
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.WindowText, SystemColors.Window };
39
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue };
40
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue };
41
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue };
42
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue };
65
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null,
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None));
66
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null,
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue));
91
DrawItemEventArgs e = new(graphics,
SystemFonts
.DefaultFont, bounds, -1, state);
101
DrawItemEventArgs e = new(graphics,
SystemFonts
.DefaultFont, bounds, -1, state);
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (11)
14
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
15
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
40
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont));
49
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont)
66
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
67
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
68
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
90
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont);
99
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont);
106
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
System\Windows\Forms\DrawToolTipEventArgsTests.cs (5)
14
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
15
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(-1, -2, -3, -4), "toolTipText", Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
38
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
39
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
40
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), "tooltipText", Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
System\Windows\Forms\FontDialogTests.cs (1)
289
yield return new object[] {
SystemFonts
.MenuFont };
System\Windows\Forms\ListBoxTests.cs (1)
1221
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ListViewItemConverterTests.cs (11)
63
Font =
SystemFonts
.MenuFont
205
new object[] { new string[] { "text5" }, 1, Color.Empty, Color.Empty,
SystemFonts
.MenuFont }
223
new object[] { new string[] { "text5" }, "imageKey", Color.Empty, Color.Empty,
SystemFonts
.MenuFont }
229
new ListViewItem(["text"], "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont),
231
new object[] { new string[] { "text" }, "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont }
235
new ListViewItem(["text"], 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont),
237
new object[] { new string[] { "text" }, 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont }
241
new ListViewItem(["text"], "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont, group),
243
new object[] { new string[] { "text" }, "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont }
247
new ListViewItem(["text"], 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont, group),
249
new object[] { new string[] { "text" }, 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (7)
47
yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red,
SystemFonts
.MenuFont, new ListViewGroup(), "imageKey", Color.Blue, Color.Red, "text" };
85
yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red,
SystemFonts
.MenuFont, new ListViewGroup(), Color.Blue, Color.Red, "text" };
123
yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red,
SystemFonts
.MenuFont, "imageKey", Color.Blue, Color.Red, "text" };
161
yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red,
SystemFonts
.MenuFont, Color.Blue, Color.Red, "text" };
1000
Font =
SystemFonts
.CaptionFont
1007
Assert.Equal(value ??
SystemFonts
.CaptionFont, item.Font);
1011
Assert.Equal(value ??
SystemFonts
.CaptionFont, item.Font);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (7)
259
yield return new object[] { string.Empty, Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, string.Empty };
260
yield return new object[] { "reasonable", Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, "reasonable" };
389
yield return new object[] { Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue };
390
yield return new object[] { Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue };
420
Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null, Color.Red, Color.Blue,
SystemFonts
.MenuFont));
904
listViewItem.SubItems.Add("Test", Color.White, Color.Black,
SystemFonts
.MenuFont);
941
listViewItem.SubItems.AddRange(["Test 1", "Test 2"], Color.White, Color.Black,
SystemFonts
.MenuFont);
System\Windows\Forms\ListViewSubItemConverterTests.cs (2)
60
new ListViewItem.ListViewSubItem(null, "text", Color.Red, Color.Blue,
SystemFonts
.MenuFont),
62
new object[] { null, "text", Color.Red, Color.Blue,
SystemFonts
.MenuFont }
System\Windows\Forms\ListViewSubItemTests.cs (19)
31
yield return new object[] { new ListViewItem() { BackColor = Color.Yellow, ForeColor = Color.Yellow, Font =
SystemFonts
.StatusFont }, "reasonable", "reasonable" };
56
yield return new object[] { new ListViewItem(), string.Empty, Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, string.Empty };
57
yield return new object[] { new ListViewItem(), "reasonable", Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, "reasonable" };
58
yield return new object[] { new ListViewItem() { BackColor = Color.Yellow, ForeColor = Color.Yellow, Font =
SystemFonts
.StatusFont }, string.Empty, Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, string.Empty };
62
yield return new object[] { item, "reasonable", Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, "reasonable" };
220
Font =
SystemFonts
.MenuFont
226
Assert.Equal(
SystemFonts
.MenuFont, subItem.Font);
238
Font =
SystemFonts
.DialogFont
253
Font =
SystemFonts
.CaptionFont
257
Font =
SystemFonts
.DialogFont
263
Assert.Equal(
SystemFonts
.CaptionFont, subItem.Font);
291
Font =
SystemFonts
.CaptionFont
295
Font =
SystemFonts
.DialogFont
302
Assert.Equal(value ??
SystemFonts
.CaptionFont, subItem.Font);
306
Assert.Equal(value ??
SystemFonts
.CaptionFont, subItem.Font);
315
Font =
SystemFonts
.DialogFont
557
var subItem = new ListViewItem.ListViewSubItem(owner, "text", Color.Red, Color.Blue,
SystemFonts
.MenuFont);
573
yield return new object[] { new ListViewItem.ListViewSubItem(null, "header", Color.Red, Color.Blue,
SystemFonts
.MenuFont) { Name = "name", Tag = "tag" } };
System\Windows\Forms\OwnerDrawPropertyBagTests.cs (4)
80
value.Font =
SystemFonts
.MenuFont;
86
Assert.Equal(
SystemFonts
.MenuFont.Name, bag.Font.Name);
111
original.Font =
SystemFonts
.MenuFont;
125
Assert.Equal(
SystemFonts
.MenuFont.Name, bag.Font.Name);
System\Windows\Forms\PictureBoxTests.cs (1)
511
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ProgressBarTests.cs (1)
516
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\RadioButtonRendererTests.cs (5)
62
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, false, rBState);
72
State.FontFace(
SystemFonts
.DefaultFont.Name)
99
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, textFormat, false, rBState);
123
SystemFonts
.DefaultFont,
138
State.FontFace(
SystemFonts
.DefaultFont.Name)
System\Windows\Forms\RichTextBoxTests.cs (1)
1658
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ScrollBarTests.cs (1)
524
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\SplitterTests.cs (1)
776
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\TextBoxRendererTests.cs (4)
67
TextBoxRenderer.DrawTextBox(graphics, bounds, "text",
SystemFonts
.DefaultFont, tBState);
79
State.FontFace(
SystemFonts
.DefaultFont.Name)
103
TextBoxRenderer.DrawTextBox(graphics, bounds, "text",
SystemFonts
.DefaultFont, textBounds, tBState);
115
State.FontFace(
SystemFonts
.DefaultFont.Name)
System\Windows\Forms\TextRendererTests.cs (153)
22
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red };
23
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black };
24
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White };
25
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent };
26
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty };
51
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red, Color.Blue };
52
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black, Color.Blue };
53
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White, Color.Blue };
54
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue };
55
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty, Color.Blue };
56
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Red };
57
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Black };
58
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.White };
59
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Transparent };
60
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Empty };
85
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red, TextFormatFlags.Default, };
86
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black, TextFormatFlags.Default, };
87
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White, TextFormatFlags.Default, };
88
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent, TextFormatFlags.Default, };
89
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty, TextFormatFlags.Default, };
91
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.HorizontalCenter };
92
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
93
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
94
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.SingleLine };
95
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)1024 };
96
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.RightToLeft };
97
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)int.MaxValue };
122
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red, Color.Blue, TextFormatFlags.Default, };
123
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black, Color.Blue, TextFormatFlags.Default, };
124
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White, Color.Blue, TextFormatFlags.Default, };
125
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue, TextFormatFlags.Default, };
126
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty, Color.Blue, TextFormatFlags.Default, };
127
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Red, TextFormatFlags.Default, };
128
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Black, TextFormatFlags.Default, };
129
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.White, TextFormatFlags.Default, };
130
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Transparent, TextFormatFlags.Default, };
131
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Empty, TextFormatFlags.Default, };
133
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
134
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
135
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.SingleLine };
136
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)1024 };
137
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.RightToLeft };
138
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue };
165
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 3, 4), Color.Red };
166
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red };
167
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black };
168
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White };
169
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent };
170
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty };
197
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue };
198
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue };
199
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue };
200
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue };
201
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue };
202
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red };
203
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black };
204
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White };
205
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent };
206
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty };
233
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default, };
234
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, TextFormatFlags.Default, };
235
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, TextFormatFlags.Default, };
236
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, TextFormatFlags.Default, };
237
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, TextFormatFlags.Default, };
239
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.HorizontalCenter };
240
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
241
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
242
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.SingleLine };
243
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.SingleLine };
244
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)1024 };
245
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.RightToLeft };
246
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)int.MaxValue };
273
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default, };
274
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue, TextFormatFlags.Default, };
275
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue, TextFormatFlags.Default, };
276
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue, TextFormatFlags.Default, };
277
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue, TextFormatFlags.Default, };
278
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red, TextFormatFlags.Default, };
279
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black, TextFormatFlags.Default, };
280
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White, TextFormatFlags.Default, };
281
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent, TextFormatFlags.Default, };
282
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty, TextFormatFlags.Default, };
284
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
285
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
286
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.SingleLine };
287
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue, TextFormatFlags.SingleLine };
288
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)1024 };
289
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.RightToLeft };
290
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue };
323
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red);
327
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue);
331
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default);
335
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default);
339
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red);
343
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default);
347
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue);
351
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default);
355
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red);
359
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue);
363
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default);
367
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default);
371
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red);
375
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default);
379
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue);
383
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default);
391
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red));
397
yield return new object[] { "string",
SystemFonts
.MenuFont };
418
yield return new object[] { "string",
SystemFonts
.MenuFont, Size.Empty };
419
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(1, 2) };
420
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200) };
421
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(int.MaxValue, int.MaxValue) };
442
yield return new object[] { "string",
SystemFonts
.MenuFont, Size.Empty, TextFormatFlags.Default };
443
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(1, 2), TextFormatFlags.Default };
444
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.Default };
445
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.Default };
447
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
448
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.Bottom | TextFormatFlags.Right };
449
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.SingleLine };
450
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.SingleLine };
451
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), (TextFormatFlags)1024 };
452
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.RightToLeft };
453
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), (TextFormatFlags)int.MaxValue };
519
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text,
SystemFonts
.MenuFont));
520
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text,
SystemFonts
.MenuFont, new Size(300, 400)));
521
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text,
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
522
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text,
SystemFonts
.MenuFont));
523
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text,
SystemFonts
.MenuFont, new Size(300, 400)));
524
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text,
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
525
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(),
SystemFonts
.MenuFont));
526
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400)));
527
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
528
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(),
SystemFonts
.MenuFont));
529
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400)));
530
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
548
TextRenderer.MeasureText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont);
552
TextRenderer.MeasureText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Size(300, 400));
556
TextRenderer.MeasureText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default);
564
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty,
SystemFonts
.MenuFont));
565
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty,
SystemFonts
.MenuFont, new Size(300, 400)));
566
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty,
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
582
State.FontFace(
SystemFonts
.DefaultFont.Name),
591
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
594
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
597
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
600
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
676
SystemFonts
.DefaultFont,
686
State.FontFace(
SystemFonts
.DefaultFont.Name),
699
SystemFonts
.DefaultFont,
709
State.FontFace(
SystemFonts
.DefaultFont.Name),
730
SystemFonts
.DefaultFont,
769
SystemFonts
.DefaultFont,
785
State.FontFace(
SystemFonts
.DefaultFont.Name),
817
SystemFonts
.DefaultFont,
System\Windows\Forms\ToolStripControlHostTests.cs (1)
33
Font =
SystemFonts
.MenuFont,
System\Windows\Forms\ToolStripDropDownTests.cs (3)
1566
using var font2 =
SystemFonts
.DialogFont;
1617
using var font2 =
SystemFonts
.DialogFont;
1682
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (8)
13
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, TextFormatFlags.Top };
14
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, TextFormatFlags.Bottom };
38
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, ContentAlignment.MiddleCenter, TextFormatFlags.Default | TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.HidePrefix };
39
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, ContentAlignment.BottomRight, TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.HidePrefix };
40
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, (ContentAlignment)(-1), TextFormatFlags.Default | TextFormatFlags.Bottom | TextFormatFlags.Right | TextFormatFlags.RightToLeft | TextFormatFlags.HidePrefix };
66
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, TextFormatFlags.Top));
67
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, ContentAlignment.TopLeft));
82
ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue,
SystemFonts
.DefaultFont, TextFormatFlags.Top)
System\Windows\Forms\ToolStripRendererTests.cs (7)
299
yield return new object[] { new SubToolStripItem(), "Text", Rectangle.Empty, Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
300
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 0, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
301
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 0), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
302
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
303
yield return new object[] { new SubToolStripItem() { Enabled = false }, "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
304
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
305
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical90 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
System\Windows\Forms\ToolStripTests.cs (3)
1482
using var font2 =
SystemFonts
.DialogFont;
1533
using var font2 =
SystemFonts
.DialogFont;
1598
using var font2 =
SystemFonts
.DialogFont;
TextBoxBaseTests.cs (1)
1142
using var font2 =
SystemFonts
.DialogFont;
TrackBarTests.cs (1)
665
using var font2 =
SystemFonts
.DialogFont;
System.Windows.Forms.TestUtilities (1)
CommonTestHelperEx.cs (1)
48
SystemFonts
.MenuFont,
WinFormsControlsTest (1)
MainForm.cs (1)
243
Debug.WriteLine($"MessageBoxFont: {
SystemFonts
.MessageBoxFont}", nameof(MainForm));