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)
102
sysFont = SystemFonts.
MenuFont
;
System.Windows.Forms.Tests (206)
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.Properties.cs (1)
10894
Font font1 = SystemFonts.
MenuFont
;
System\Windows\Forms\DataGridViewCellStyleTests.cs (1)
914
new DataGridViewCellStyle { Font = SystemFonts.
MenuFont
},
System\Windows\Forms\DataGridViewRowTests.cs (1)
2059
Font font2 = SystemFonts.
MenuFont
;
System\Windows\Forms\FontDialogTests.cs (1)
291
yield return new object[] { SystemFonts.
MenuFont
};
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 (4)
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" };
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 (8)
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);
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\TextRendererTests.cs (140)
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));
System\Windows\Forms\ToolStripControlHostTests.cs (1)
35
Font = SystemFonts.
MenuFont
,
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.TestUtilities (1)
CommonTestHelperEx.cs (1)
48
SystemFonts.
MenuFont
,