38 references to MeasureText
System.Windows.Forms (16)
System\Windows\Forms\Controls\Buttons\Button.cs (1)
96
Size requiredSize = TextRenderer.
MeasureText
(Text, Font);
System\Windows\Forms\Controls\Buttons\CheckBox.cs (1)
283
Size textSize = TextRenderer.
MeasureText
(Text, Font);
System\Windows\Forms\Controls\Buttons\RadioButton.cs (1)
254
Size textSize = TextRenderer.
MeasureText
(Text, Font);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
606
Size preferredSize = TextRenderer.
MeasureText
(comboBox.GetItemText(item), comboBox.Font);
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (1)
142
int padding = TextRenderer.
MeasureText
(" ", Font).Width;
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
104
Size textSize = TextRenderer.
MeasureText
(subItem.Text, subItem.Font);
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (1)
140
int padding = TextRenderer.
MeasureText
(" ", font).Width;
System\Windows\Forms\Controls\ListView\ListViewItem.IKeyboardToolTip.cs (3)
114
new Size(Math.Min(TextRenderer.
MeasureText
(item.Text, item.Font).Width, itemBounds.Width),
123
int textWidth = TextRenderer.
MeasureText
(item.Text, item.Font).Width;
128
textWidth = Math.Max(TextRenderer.
MeasureText
(subItem.Text, subItem.Font).Width, textWidth);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
295
_tabWidth = TextRenderer.
MeasureText
("\t", Font).Width;
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2351
_cachedTextSize = TextRenderer.
MeasureText
(Text, Font);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
734
_cachedShortcutSize = TextRenderer.
MeasureText
(shortcutString, Font);
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2828
Size textSize = TextRenderer.
MeasureText
(node.Text, node.TreeView!.Font);
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (2)
813
int textWidth = TextRenderer.
MeasureText
(GetNumberText(testNumber), Font).Width;
821
int shortTextWidth = TextRenderer.
MeasureText
(shortText, Font).Width;
System.Windows.Forms.Design (2)
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
62
if (_showSplit && !string.IsNullOrEmpty(Text) && TextRenderer.
MeasureText
(Text, Font).Width + PushButtonWidth > preferredSize.Width)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1160
int itemWidth = TextRenderer.
MeasureText
(_selectedColumns.Items[i].ToString(), _selectedColumns.Font).Width;
System.Windows.Forms.Tests (20)
System\Windows\Forms\ButtonTests.cs (13)
599
Size newSize = TextRenderer.
MeasureText
(control.Text, control.Font);
696
Size oldSize = TextRenderer.
MeasureText
(control.Text, control.Font);
700
Size newSize = TextRenderer.
MeasureText
(control.Text, font);
951
Size oldSize = TextRenderer.
MeasureText
(control.Text, control.Font);
955
Size newSize = TextRenderer.
MeasureText
("NewText", control.Font);
1338
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1362
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1634
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1658
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1682
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1706
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1730
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
1754
Size minSize = TextRenderer.
MeasureText
(control.Text, control.Font);
System\Windows\Forms\ListViewItem.IKeyboardToolTipTests.cs (2)
184
? TextRenderer.
MeasureText
(listViewItem.Text, listViewItem.Font).Width
200
? TextRenderer.
MeasureText
(listViewSubItem.Text, listViewSubItem.Font).Width
System\Windows\Forms\TextRendererTests.cs (3)
404
Size result = TextRenderer.
MeasureText
(text, font);
409
Assert.Equal(result, TextRenderer.
MeasureText
(text, font));
519
Assert.Equal(Size.Empty, TextRenderer.
MeasureText
(text, SystemFonts.MenuFont));
TextBoxBaseTests.cs (2)
5085
int width = TextRenderer.
MeasureText
(control.Text, control.Font).Width;
5105
int width = TextRenderer.
MeasureText
(control.Text, control.Font).Width;