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)
262
_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)
1397
Font newSystemFont =
SystemFonts
.GetFontByName(s_defaultFont.SystemFontName)!;
System\Windows\Forms\Control.cs (2)
1564
s_defaultFont = Application.DefaultFont ??
SystemFonts
.MessageBoxFont;
12522
Font font =
SystemFonts
.MessageBoxFont!;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
102
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)
199
Font customFont = (Font)
SystemFonts
.CaptionFont.Clone();
253
Assert.Throws<InvalidOperationException>(() => Application.SetDefaultFont(
SystemFonts
.CaptionFont));
272
using Font sysFont =
SystemFonts
.CaptionFont;
System\Windows\Forms\ButtonTests.cs (1)
732
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\CheckBoxRendererTests.cs (7)
33
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, false, cBState);
70
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, false, cBState);
80
State.FontFace(
SystemFonts
.DefaultFont.Name)
107
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, textFormat, false, cBState);
117
State.FontFace(
SystemFonts
.DefaultFont.Name)
141
CheckBoxRenderer.DrawCheckBox(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, TextFormatFlags.Default, focus, cBState, HWND.Null);
151
State.FontFace(
SystemFonts
.DefaultFont.Name)
System\Windows\Forms\ComboBoxTests.cs (1)
1030
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ContainerControlTests.cs (1)
473
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ControlPaintTests.cs (18)
1902
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), null };
1903
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, RectangleF.Empty, new StringFormat() };
1904
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, -3, -4), new StringFormat() };
1905
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat() };
1906
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Black, new RectangleF(1, 2, 3, 4), new StringFormat() };
1907
yield return new object[] { s,
SystemFonts
.MenuFont, Color.White, new RectangleF(1, 2, 3, 4), new StringFormat() };
1908
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Transparent, new RectangleF(1, 2, 3, 4), new StringFormat() };
1909
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Empty, new RectangleF(1, 2, 3, 4), new StringFormat() };
1943
Assert.Throws<ArgumentNullException>("graphics", () => ControlPaint.DrawStringDisabled(null, s,
SystemFonts
.MenuFont, Color.Red, new RectangleF(1, 2, 3, 4), new StringFormat()));
1950
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.Default };
1951
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, Rectangle.Empty, TextFormatFlags.VerticalCenter };
1952
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, -3, -4), TextFormatFlags.VerticalCenter };
1953
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Red, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1954
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Black, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1955
yield return new object[] { s,
SystemFonts
.MenuFont, Color.White, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1956
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Transparent, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1957
yield return new object[] { s,
SystemFonts
.MenuFont, Color.Empty, new Rectangle(1, 2, 3, 4), TextFormatFlags.VerticalCenter };
1979
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)
496
Assert.Equal(
SystemFonts
.MessageBoxFont, Control.DefaultFont);
System\Windows\Forms\ControlTests.Properties.cs (8)
5046
using var font2 =
SystemFonts
.DialogFont;
5117
using var font2 =
SystemFonts
.DialogFont;
5210
using var font2 =
SystemFonts
.DialogFont;
10720
Font font1 =
SystemFonts
.CaptionFont;
10721
Font font2 =
SystemFonts
.DialogFont;
10894
Font font1 =
SystemFonts
.MenuFont;
10895
Font font2 =
SystemFonts
.DialogFont;
10956
Font controlFont =
SystemFonts
.StatusFont;
System\Windows\Forms\DataGridViewCellStyleTests.cs (17)
47
Font =
SystemFonts
.DefaultFont,
64
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
262
yield return new object[] {
SystemFonts
.DefaultFont };
285
Font =
SystemFonts
.DefaultFont
624
Font =
SystemFonts
.DefaultFont,
642
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
667
Font =
SystemFonts
.DefaultFont,
684
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
715
Font =
SystemFonts
.DefaultFont,
732
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
781
Font =
SystemFonts
.DefaultFont,
798
Assert.Equal(
SystemFonts
.DefaultFont, style.Font);
840
Font font =
SystemFonts
.DefaultFont;
914
new DataGridViewCellStyle { Font =
SystemFonts
.MenuFont },
1072
new DataGridViewCellStyle { Font =
SystemFonts
.DefaultFont },
1073
$"DataGridViewCellStyle {{ Font={
SystemFonts
.DefaultFont} }}"
1121
Font font =
SystemFonts
.DefaultFont;
System\Windows\Forms\DataGridViewCellTests.cs (24)
5256
int height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default);
5259
height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default, out bool widthTruncated);
5271
int height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 20, TextFormatFlags.Default);
5274
height = DataGridViewCell.MeasureTextHeight(graphics, text,
SystemFonts
.DefaultFont, 20, TextFormatFlags.Default, out bool widthTruncated);
5283
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text",
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default));
5284
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextHeight(null, "text",
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default, out widthTruncated));
5307
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, maxWidth, TextFormatFlags.Default));
5308
Assert.Throws<ArgumentOutOfRangeException>("maxWidth", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, maxWidth, TextFormatFlags.Default, out widthTruncated));
5319
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, 10, flags));
5320
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextHeight(graphics, "text",
SystemFonts
.DefaultFont, 10, flags, out widthTruncated));
5330
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text,
SystemFonts
.DefaultFont, 0.2f, TextFormatFlags.Default));
5344
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextPreferredSize(graphics, text,
SystemFonts
.DefaultFont, 0.2f, flags));
5350
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextPreferredSize(null, "text",
SystemFonts
.DefaultFont, 0.2f, TextFormatFlags.Default));
5368
Assert.Throws<ArgumentOutOfRangeException>("maxRatio", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text",
SystemFonts
.DefaultFont, maxRatio, TextFormatFlags.Default));
5377
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextPreferredSize(graphics, "text",
SystemFonts
.DefaultFont, 0.2f, flags));
5386
Assert.Equal(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text,
SystemFonts
.DefaultFont, TextFormatFlags.Default));
5400
Assert.NotEqual(Size.Empty, DataGridViewCell.MeasureTextSize(graphics, text,
SystemFonts
.DefaultFont, flags));
5406
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextSize(null, "text",
SystemFonts
.DefaultFont, TextFormatFlags.Default));
5423
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextSize(graphics, "text",
SystemFonts
.DefaultFont, flags));
5432
Assert.Equal(0, DataGridViewCell.MeasureTextWidth(graphics, text,
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default));
5446
Assert.NotEqual(0, DataGridViewCell.MeasureTextWidth(graphics, text,
SystemFonts
.DefaultFont, 10, flags));
5452
Assert.Throws<ArgumentNullException>("graphics", () => DataGridViewCell.MeasureTextWidth(null, "text",
SystemFonts
.DefaultFont, 10, TextFormatFlags.Default));
5470
Assert.Throws<ArgumentOutOfRangeException>("maxHeight", () => DataGridViewCell.MeasureTextWidth(graphics, "text",
SystemFonts
.DefaultFont, maxHeight, TextFormatFlags.Default));
5479
Assert.Throws<InvalidEnumArgumentException>("flags", () => DataGridViewCell.MeasureTextWidth(graphics, "text",
SystemFonts
.DefaultFont, 10, flags));
System\Windows\Forms\DataGridViewRowTests.cs (2)
2058
Font font1 =
SystemFonts
.DefaultFont;
2059
Font font2 =
SystemFonts
.MenuFont;
System\Windows\Forms\DrawItemEventArgsTests.cs (12)
16
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, SystemColors.WindowText, SystemColors.Window };
17
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight };
18
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, SystemColors.WindowText, SystemColors.Window };
19
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, SystemColors.WindowText, SystemColors.Window };
41
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), -1, DrawItemState.None, Color.Red, Color.Blue };
42
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue };
43
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus, Color.Red, Color.Blue };
44
yield return new object[] {
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 1, DrawItemState.Focus | DrawItemState.NoFocusRect, Color.Red, Color.Blue };
67
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null,
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None));
68
Assert.Throws<ArgumentNullException>("graphics", () => new DrawItemEventArgs(null,
SystemFonts
.DefaultFont, new Rectangle(1, 2, 3, 4), 0, DrawItemState.None, Color.Red, Color.Blue));
93
DrawItemEventArgs e = new(graphics,
SystemFonts
.DefaultFont, bounds, -1, state);
103
DrawItemEventArgs e = new(graphics,
SystemFonts
.DefaultFont, bounds, -1, state);
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (11)
16
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
17
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
18
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
42
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont));
51
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, 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 };
69
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
70
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(), ListViewItemStates.Default, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
92
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header, ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont);
101
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(), ListViewItemStates.Checked, Color.Red, Color.Blue,
SystemFonts
.DefaultFont);
108
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)
16
yield return new object[] { new Mock<IWin32Window>(MockBehavior.Strict).Object, new Button(), new Rectangle(1, 2, 3, 4), "", Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
17
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 };
40
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), null, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
41
yield return new object[] { new SubWin32Window(), new Button(), new Rectangle(1, 2, 3, 4), string.Empty, Color.Red, Color.Blue,
SystemFonts
.DefaultFont };
42
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)
291
yield return new object[] {
SystemFonts
.MenuFont };
System\Windows\Forms\ListBoxTests.cs (1)
1223
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ListViewItemConverterTests.cs (11)
65
Font =
SystemFonts
.MenuFont
207
new object[] { new string[] { "text5" }, 1, Color.Empty, Color.Empty,
SystemFonts
.MenuFont }
225
new object[] { new string[] { "text5" }, "imageKey", Color.Empty, Color.Empty,
SystemFonts
.MenuFont }
231
new ListViewItem(["text"], "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont),
233
new object[] { new string[] { "text" }, "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont }
237
new ListViewItem(["text"], 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont),
239
new object[] { new string[] { "text" }, 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont }
243
new ListViewItem(["text"], "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont, group),
245
new object[] { new string[] { "text" }, "imageKey", Color.Red, Color.Blue,
SystemFonts
.MenuFont }
249
new ListViewItem(["text"], 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont, group),
251
new object[] { new string[] { "text" }, 1, Color.Red, Color.Blue,
SystemFonts
.MenuFont }
System\Windows\Forms\ListViewItemTests.cs (7)
49
yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red,
SystemFonts
.MenuFont, new ListViewGroup(), "imageKey", Color.Blue, Color.Red, "text" };
87
yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red,
SystemFonts
.MenuFont, new ListViewGroup(), Color.Blue, Color.Red, "text" };
125
yield return new object[] { new string[] { "text" }, "imageKey", Color.Blue, Color.Red,
SystemFonts
.MenuFont, "imageKey", Color.Blue, Color.Red, "text" };
163
yield return new object[] { new string[] { "text" }, 2, Color.Blue, Color.Red,
SystemFonts
.MenuFont, Color.Blue, Color.Red, "text" };
1002
Font =
SystemFonts
.CaptionFont
1009
Assert.Equal(value ??
SystemFonts
.CaptionFont, item.Font);
1013
Assert.Equal(value ??
SystemFonts
.CaptionFont, item.Font);
System\Windows\Forms\ListViewSubItemCollectionTests.cs (7)
260
yield return new object[] { string.Empty, Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, string.Empty };
261
yield return new object[] { "reasonable", Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, "reasonable" };
390
yield return new object[] { Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue };
391
yield return new object[] { Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue };
421
Assert.Throws<ArgumentNullException>("items", () => collection.AddRange((string[])null, Color.Red, Color.Blue,
SystemFonts
.MenuFont));
905
listViewItem.SubItems.Add("Test", Color.White, Color.Black,
SystemFonts
.MenuFont);
942
listViewItem.SubItems.AddRange(["Test 1", "Test 2"], Color.White, Color.Black,
SystemFonts
.MenuFont);
System\Windows\Forms\ListViewSubItemConverterTests.cs (2)
62
new ListViewItem.ListViewSubItem(null, "text", Color.Red, Color.Blue,
SystemFonts
.MenuFont),
64
new object[] { null, "text", Color.Red, Color.Blue,
SystemFonts
.MenuFont }
System\Windows\Forms\ListViewSubItemTests.cs (19)
33
yield return new object[] { new ListViewItem() { BackColor = Color.Yellow, ForeColor = Color.Yellow, Font =
SystemFonts
.StatusFont }, "reasonable", "reasonable" };
57
yield return new object[] { new ListViewItem(), string.Empty, Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, string.Empty };
58
yield return new object[] { new ListViewItem(), "reasonable", Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, "reasonable" };
59
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 };
63
yield return new object[] { item, "reasonable", Color.Red, Color.Blue,
SystemFonts
.MenuFont, Color.Red, Color.Blue, "reasonable" };
221
Font =
SystemFonts
.MenuFont
227
Assert.Equal(
SystemFonts
.MenuFont, subItem.Font);
239
Font =
SystemFonts
.DialogFont
254
Font =
SystemFonts
.CaptionFont
258
Font =
SystemFonts
.DialogFont
264
Assert.Equal(
SystemFonts
.CaptionFont, subItem.Font);
292
Font =
SystemFonts
.CaptionFont
296
Font =
SystemFonts
.DialogFont
303
Assert.Equal(value ??
SystemFonts
.CaptionFont, subItem.Font);
307
Assert.Equal(value ??
SystemFonts
.CaptionFont, subItem.Font);
316
Font =
SystemFonts
.DialogFont
558
var subItem = new ListViewItem.ListViewSubItem(owner, "text", Color.Red, Color.Blue,
SystemFonts
.MenuFont);
574
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)
82
value.Font =
SystemFonts
.MenuFont;
88
Assert.Equal(
SystemFonts
.MenuFont.Name, bag.Font.Name);
113
original.Font =
SystemFonts
.MenuFont;
127
Assert.Equal(
SystemFonts
.MenuFont.Name, bag.Font.Name);
System\Windows\Forms\PictureBoxTests.cs (1)
513
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ProgressBarTests.cs (1)
518
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\RadioButtonRendererTests.cs (5)
65
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, false, rBState);
75
State.FontFace(
SystemFonts
.DefaultFont.Name)
102
RadioButtonRenderer.DrawRadioButton(graphics, point, bounds, control.Text,
SystemFonts
.DefaultFont, textFormat, false, rBState);
134
SystemFonts
.DefaultFont,
149
State.FontFace(
SystemFonts
.DefaultFont.Name)
System\Windows\Forms\RichTextBoxTests.cs (1)
1660
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ScrollBarTests.cs (1)
526
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\SplitterTests.cs (1)
778
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\TextBoxRendererTests.cs (4)
69
TextBoxRenderer.DrawTextBox(graphics, bounds, "text",
SystemFonts
.DefaultFont, tBState);
81
State.FontFace(
SystemFonts
.DefaultFont.Name)
105
TextBoxRenderer.DrawTextBox(graphics, bounds, "text",
SystemFonts
.DefaultFont, textBounds, tBState);
117
State.FontFace(
SystemFonts
.DefaultFont.Name)
System\Windows\Forms\TextRendererTests.cs (153)
24
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red };
25
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black };
26
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White };
27
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent };
28
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty };
53
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red, Color.Blue };
54
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black, Color.Blue };
55
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White, Color.Blue };
56
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue };
57
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty, Color.Blue };
58
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Red };
59
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Black };
60
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.White };
61
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Transparent };
62
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Empty };
87
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red, TextFormatFlags.Default, };
88
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black, TextFormatFlags.Default, };
89
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White, TextFormatFlags.Default, };
90
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent, TextFormatFlags.Default, };
91
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty, TextFormatFlags.Default, };
93
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.HorizontalCenter };
94
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
95
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
96
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.SingleLine };
97
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)1024 };
98
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.RightToLeft };
99
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, (TextFormatFlags)int.MaxValue };
124
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Red, Color.Blue, TextFormatFlags.Default, };
125
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Black, Color.Blue, TextFormatFlags.Default, };
126
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.White, Color.Blue, TextFormatFlags.Default, };
127
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Transparent, Color.Blue, TextFormatFlags.Default, };
128
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Point(1, 2), Color.Empty, Color.Blue, TextFormatFlags.Default, };
129
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Red, TextFormatFlags.Default, };
130
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Black, TextFormatFlags.Default, };
131
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.White, TextFormatFlags.Default, };
132
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Transparent, TextFormatFlags.Default, };
133
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Empty, TextFormatFlags.Default, };
135
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
136
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
137
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.SingleLine };
138
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)1024 };
139
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.RightToLeft };
140
yield return new object[] { hint, text,
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue };
167
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 3, 4), Color.Red };
168
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red };
169
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black };
170
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White };
171
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent };
172
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty };
199
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue };
200
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue };
201
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue };
202
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue };
203
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue };
204
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red };
205
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black };
206
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White };
207
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent };
208
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty };
235
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default, };
236
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, TextFormatFlags.Default, };
237
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, TextFormatFlags.Default, };
238
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, TextFormatFlags.Default, };
239
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, TextFormatFlags.Default, };
241
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.HorizontalCenter };
242
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
243
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Bottom | TextFormatFlags.Right };
244
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.SingleLine };
245
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, TextFormatFlags.SingleLine };
246
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)1024 };
247
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.RightToLeft };
248
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, (TextFormatFlags)int.MaxValue };
275
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default, };
276
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Black, Color.Blue, TextFormatFlags.Default, };
277
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.White, Color.Blue, TextFormatFlags.Default, };
278
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Transparent, Color.Blue, TextFormatFlags.Default, };
279
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Empty, Color.Blue, TextFormatFlags.Default, };
280
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Red, TextFormatFlags.Default, };
281
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Black, TextFormatFlags.Default, };
282
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.White, TextFormatFlags.Default, };
283
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Transparent, TextFormatFlags.Default, };
284
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Empty, TextFormatFlags.Default, };
286
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
287
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Bottom | TextFormatFlags.Right };
288
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.SingleLine };
289
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, int.MaxValue, int.MaxValue), Color.Red, Color.Blue, TextFormatFlags.SingleLine };
290
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)1024 };
291
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.RightToLeft };
292
yield return new object[] { hint, text,
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, (TextFormatFlags)int.MaxValue };
325
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red);
329
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue);
333
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default);
337
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default);
341
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red);
345
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default);
349
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue);
353
TextRenderer.DrawText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default);
357
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red);
361
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue);
365
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red, TextFormatFlags.Default);
369
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, Point.Empty, Color.Red, Color.Blue, TextFormatFlags.Default);
373
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red);
377
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, TextFormatFlags.Default);
381
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue);
385
TextRenderer.DrawText(mockDeviceContext.Object, "text".AsSpan(),
SystemFonts
.MenuFont, new Rectangle(1, 2, 300, 400), Color.Red, Color.Blue, TextFormatFlags.Default);
393
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.DrawText(null, "text",
SystemFonts
.MenuFont, Point.Empty, Color.Red));
399
yield return new object[] { "string",
SystemFonts
.MenuFont };
420
yield return new object[] { "string",
SystemFonts
.MenuFont, Size.Empty };
421
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(1, 2) };
422
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200) };
423
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(int.MaxValue, int.MaxValue) };
444
yield return new object[] { "string",
SystemFonts
.MenuFont, Size.Empty, TextFormatFlags.Default };
445
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(1, 2), TextFormatFlags.Default };
446
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.Default };
447
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.Default };
449
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter };
450
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.Bottom | TextFormatFlags.Right };
451
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.SingleLine };
452
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(int.MaxValue, int.MaxValue), TextFormatFlags.SingleLine };
453
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), (TextFormatFlags)1024 };
454
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), TextFormatFlags.RightToLeft };
455
yield return new object[] { "string",
SystemFonts
.MenuFont, new Size(100, 200), (TextFormatFlags)int.MaxValue };
521
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text,
SystemFonts
.MenuFont));
522
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text,
SystemFonts
.MenuFont, new Size(300, 400)));
523
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text,
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
524
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text,
SystemFonts
.MenuFont));
525
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text,
SystemFonts
.MenuFont, new Size(300, 400)));
526
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text,
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
527
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(),
SystemFonts
.MenuFont));
528
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400)));
529
Assert.Equal(Size.Empty, TextRenderer.MeasureText(text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
530
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(),
SystemFonts
.MenuFont));
531
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400)));
532
Assert.Equal(Size.Empty, TextRenderer.MeasureText(graphics, text.AsSpan(),
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
550
TextRenderer.MeasureText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont);
554
TextRenderer.MeasureText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Size(300, 400));
558
TextRenderer.MeasureText(mockDeviceContext.Object, "text",
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default);
566
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty,
SystemFonts
.MenuFont));
567
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty,
SystemFonts
.MenuFont, new Size(300, 400)));
568
Assert.Throws<ArgumentNullException>("dc", () => TextRenderer.MeasureText(null, string.Empty,
SystemFonts
.MenuFont, new Size(300, 400), TextFormatFlags.Default));
584
State.FontFace(
SystemFonts
.DefaultFont.Name),
593
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
596
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
599
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
602
TextRenderer.DrawText(context, "Acrylic",
SystemFonts
.DefaultFont,
678
SystemFonts
.DefaultFont,
688
State.FontFace(
SystemFonts
.DefaultFont.Name),
701
SystemFonts
.DefaultFont,
711
State.FontFace(
SystemFonts
.DefaultFont.Name),
732
SystemFonts
.DefaultFont,
771
SystemFonts
.DefaultFont,
787
State.FontFace(
SystemFonts
.DefaultFont.Name),
819
SystemFonts
.DefaultFont,
System\Windows\Forms\ToolStripControlHostTests.cs (1)
35
Font =
SystemFonts
.MenuFont,
System\Windows\Forms\ToolStripDropDownTests.cs (3)
1568
using var font2 =
SystemFonts
.DialogFont;
1619
using var font2 =
SystemFonts
.DialogFont;
1684
using var font2 =
SystemFonts
.DialogFont;
System\Windows\Forms\ToolStripItemTextRenderEventArgsTests.cs (8)
15
yield return new object[] { new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, TextFormatFlags.Top };
16
yield return new object[] { new ToolStripButton() { RightToLeft = RightToLeft.Yes }, "text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, TextFormatFlags.Bottom };
40
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 };
41
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 };
42
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 };
68
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, TextFormatFlags.Top));
69
Assert.Throws<ArgumentNullException>("item", () => new ToolStripItemTextRenderEventArgs(graphics, null, "", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.DefaultFont, ContentAlignment.TopLeft));
84
ToolStripItemTextRenderEventArgs e = new(graphics, new ToolStripButton(), "", new Rectangle(1, 2, 3, 4), Color.Blue,
SystemFonts
.DefaultFont, TextFormatFlags.Top)
System\Windows\Forms\ToolStripRendererTests.cs (7)
301
yield return new object[] { new SubToolStripItem(), "Text", Rectangle.Empty, Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
302
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 0, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
303
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 0), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
304
yield return new object[] { new SubToolStripItem(), "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
305
yield return new object[] { new SubToolStripItem() { Enabled = false }, "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
306
yield return new object[] { new SubToolStripItem() { TextDirection = ToolStripTextDirection.Vertical270 }, "Text", new Rectangle(1, 2, 3, 4), Color.Red,
SystemFonts
.MenuFont, TextFormatFlags.Left };
307
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)
1484
using var font2 =
SystemFonts
.DialogFont;
1535
using var font2 =
SystemFonts
.DialogFont;
1600
using var font2 =
SystemFonts
.DialogFont;
TextBoxBaseTests.cs (1)
1144
using var font2 =
SystemFonts
.DialogFont;
TrackBarTests.cs (1)
667
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));