11 references to MeasureText
System.Windows.Forms (4)
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
181
Size measuredBounds = TextRenderer.
MeasureText
(
284
Size measuredBounds = TextRenderer.
MeasureText
(
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (1)
24
: TextRenderer.
MeasureText
(
System\Windows\Forms\Rendering\TextRenderer.cs (1)
399
/// <see cref="
MeasureText
(IDeviceContext, string?, Font?, Size, TextFormatFlags)"/>.
System.Windows.Forms.Tests (7)
System\Windows\Forms\TextRendererTests.cs (7)
505
Size result = TextRenderer.
MeasureText
(graphics, text, font, proposedSize, flags);
510
Assert.Equal(result, TextRenderer.
MeasureText
(graphics, text, font, proposedSize, flags));
524
Assert.Equal(Size.Empty, TextRenderer.
MeasureText
(graphics, text, SystemFonts.MenuFont, new Size(300, 400), TextFormatFlags.Default));
556
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, new Size(300, 400), TextFormatFlags.Default));
727
Size size = TextRenderer.
MeasureText
(
814
Size size = TextRenderer.
MeasureText
(