29 references to MeasureString
System.Drawing.Common.Tests (15)
mono\System.Drawing\GraphicsTests.cs (14)
1575
SizeF size = g.
MeasureString
(null, _font);
1577
size = g.
MeasureString
(string.Empty, _font);
1583
size = g.
MeasureString
(null, null);
1585
size = g.
MeasureString
(string.Empty, null);
1596
Assert.Throws<ArgumentNullException>(() => g.
MeasureString
("a", null));
1782
SizeF size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1805
SizeF size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1810
SizeF expected = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1814
size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1820
expected = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1822
size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1826
size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1833
expected = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
1837
size = useSpan ? g.MeasureString(s.AsSpan(), _font) : g.
MeasureString
(s, _font);
mono\System.Imaging\MetafileTest.cs (1)
308
SizeF size = g.
MeasureString
(text, test_font);
System.Windows.Forms (5)
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
2282
width = (int)(Math.Ceiling(graphics.
MeasureString
(GetItemText(item), Font).Width));
System\Windows\Forms\Controls\ListView\ListView.cs (1)
5471
int textWidth = Size.Ceiling(g.
MeasureString
(text, Font)).Width;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1225
_cacheItems.LastValueTextWidth = (int)graphics.
MeasureString
(text, font).Width;
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
209
int titleWidth = (int)graphics.
MeasureString
(title, Font).Width;
System\Windows\Forms\Form.cs (1)
3736
float stringWidth = graphics.
MeasureString
(magicString, font).Width;
System.Windows.Forms.Design (9)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (4)
212
SizeF sizeW = g.
MeasureString
(c.ToString(CultureInfo.CurrentCulture), _listBox.Font);
220
SizeF size = g.
MeasureString
(GetDisplayText(item), _listBox.Font);
564
SizeF sizeW = g.
MeasureString
(maxC.ToString(CultureInfo.CurrentCulture), _listBox.Font);
621
int width = offset + (int)g.
MeasureString
(itemText, Font).Width;
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
363
size = g.
MeasureString
(SR.MultilineStringEditorWatermark, Font);
System\Windows\Forms\Design\ComponentTray.cs (1)
1990
Size sz = Size.Ceiling(gr.
MeasureString
(Text, Font));
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
50
width = Math.Max(width, Size.Ceiling(g.
MeasureString
(item.ToString(), _typesListBox.Font)).Width);
System\Windows\Forms\Design\SplitterPanelDesigner.cs (1)
192
int watermarkX = rectangle.Width / 2 - (int)g.
MeasureString
(name, drawFont).Width / 2;
System\Windows\Forms\Design\TabOrder.cs (1)
256
var sz = Size.Ceiling(graphics.
MeasureString
(str, font));