210 references to MenuFont
System.Drawing.Common.Tests (2)
System\Drawing\SystemFontsTests.cs (2)
14
yield return new object[] { () => SystemFonts.
MenuFont
};
132
[(() => SystemFonts.
MenuFont
), nameof(MenuFont), MenuFont],
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (1)
103
sysFont = SystemFonts.
MenuFont
;
System.Windows.Forms.Tests (206)
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.Properties.cs (1)
10892
Font font1 = SystemFonts.
MenuFont
;
System\Windows\Forms\DataGridViewCellStyleTests.cs (1)
915
new DataGridViewCellStyle { Font = SystemFonts.
MenuFont
},
System\Windows\Forms\DataGridViewRowTests.cs (1)
2057
Font font2 = SystemFonts.
MenuFont
;
System\Windows\Forms\FontDialogTests.cs (1)
289
yield return new object[] { SystemFonts.
MenuFont
};
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 (4)
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" };
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 (8)
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);
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\TextRendererTests.cs (140)
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));
System\Windows\Forms\ToolStripControlHostTests.cs (1)
33
Font = SystemFonts.
MenuFont
,
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.TestUtilities (1)
CommonTestHelperEx.cs (1)
48
SystemFonts.
MenuFont
,