75 references to TextRenderer
System.Windows.Forms (75)
winforms\Managed\System\WinForms\Button.cs (1)
129
requiredSize =
TextRenderer
.MeasureText(this.Text, this.Font);
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (5)
663
TextRenderer
.DrawText(g, Control.Text, Control.Font, r, colors.buttonShadow, formatFlags);
667
TextRenderer
.DrawText(g, Control.Text, Control.Font, r, colors.highlight, formatFlags);
670
TextRenderer
.DrawText(g, Control.Text, Control.Font, r, colors.buttonShadow, formatFlags);
674
TextRenderer
.DrawText(g, Control.Text, Control.Font, r, c, formatFlags);
1452
textSize =
TextRenderer
.MeasureText(text, font, proposedSize, this.TextFormatFlags);
winforms\Managed\System\WinForms\ButtonRenderer.cs (2)
179
TextRenderer
.DrawText(g, buttonText, font, contentBounds, textColor, flags);
250
TextRenderer
.DrawText(g, buttonText, font, contentBounds, textColor, flags);
winforms\Managed\System\WinForms\CheckBox.cs (1)
378
Size textSize =
TextRenderer
.MeasureText(this.Text, this.Font);
winforms\Managed\System\WinForms\CheckBoxRenderer.cs (2)
165
TextRenderer
.DrawText(g, checkBoxText, font, textBounds, textColor, flags);
214
TextRenderer
.DrawText(g, checkBoxText, font, textBounds, textColor, flags);
winforms\Managed\System\WinForms\CheckedListBox.cs (1)
833
TextRenderer
.DrawText(e.Graphics, text, font, stringBounds, foreColor, flags );
winforms\Managed\System\WinForms\ComboBox.cs (2)
936
Size textSize =
TextRenderer
.MeasureText(LayoutUtils.TestString, this.Font, new Size(Int16.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
946
Size textSize =
TextRenderer
.MeasureText(LayoutUtils.TestString, this.Font, new Size(Int16.MaxValue, (int)(FontHeight * 1.25)), TextFormatFlags.SingleLine);
winforms\Managed\System\WinForms\ComboBoxRenderer.cs (1)
140
TextRenderer
.DrawText(g, comboBoxText, font, textBounds, textColor, flags);
winforms\Managed\System\WinForms\ControlPaint.cs (3)
1964
TextRenderer
.DrawText(dc, s, font, layoutRectangle, SystemColors.GrayText, format);
1970
TextRenderer
.DrawText(dc, s, font, layoutRectangle, paintcolor, format);
1973
TextRenderer
.DrawText(dc, s, font, layoutRectangle, paintcolor, format);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (1)
1038
TextRenderer
.DrawText(g,
winforms\Managed\System\WinForms\DataGridViewCell.cs (4)
2867
Size requiredSize =
TextRenderer
.MeasureText(text, font, new Size(maxWidth, System.Int32.MaxValue), flags);
2915
textSize =
TextRenderer
.MeasureText(text, font, new Size((int)maxWidth, System.Int32.MaxValue), flags);
2950
return
TextRenderer
.MeasureText(text, font, new Size(System.Int32.MaxValue, System.Int32.MaxValue), flags);
2978
textSize =
TextRenderer
.MeasureText(text, font, new Size((int)maxWidth, maxHeight), flags);
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (1)
991
TextRenderer
.DrawText(g,
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (2)
830
Size preferredSize =
TextRenderer
.MeasureText(comboBox.GetItemText(item), comboBox.Font);
2616
TextRenderer
.DrawText(g,
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (1)
1105
TextRenderer
.DrawText(g,
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (1)
1011
TextRenderer
.DrawText(graphics,
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (1)
770
TextRenderer
.DrawText(graphics,
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (1)
362
TextRenderer
.DrawText(graphics,
winforms\Managed\System\WinForms\DataGridViewUtilities.cs (2)
323
Size sizeRequired =
TextRenderer
.MeasureText(text, font, new Size(System.Int32.MaxValue, System.Int32.MaxValue), flags);
331
Size sizeConstraint =
TextRenderer
.MeasureText(text, font, sizeCell, flags);
winforms\Managed\System\WinForms\DrawListViewColumnHeaderEventArgs.cs (2)
212
int padding =
TextRenderer
.MeasureText(" ", font).Width;
215
TextRenderer
.DrawText(graphics, text, font, newBounds, foreColor, flags);
winforms\Managed\System\WinForms\DrawListViewItemEventArgs.cs (2)
160
TextRenderer
.DrawText(graphics, item.Text, item.Font, UpdateBounds(bounds, true /*drawText*/), item.ForeColor, flags);
171
Size textSize =
TextRenderer
.MeasureText(subItem.Text, subItem.Font);
winforms\Managed\System\WinForms\DrawListViewSubItemEventArgs.cs (2)
218
int padding =
TextRenderer
.MeasureText(" ", font).Width;
221
TextRenderer
.DrawText(graphics, text, font, newBounds, color, flags);
winforms\Managed\System\WinForms\DrawToolTipEventArgs.cs (1)
150
TextRenderer
.DrawText(graphics, toolTipText, font, bounds, foreColor, flags);
winforms\Managed\System\WinForms\GroupBox.cs (1)
536
Color textcolor = this.Enabled ? ForeColor :
TextRenderer
.DisabledTextColor(this.BackColor);
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (4)
171
Size measuredBounds =
TextRenderer
.MeasureText(g, groupBoxText, font, new Size(textBounds.Width, textBounds.Height), flags);
182
TextRenderer
.DrawText(g, groupBoxText, font, textBounds, textColor, flags);
264
Size measuredBounds =
TextRenderer
.MeasureText(g, groupBoxText, font, new Size(textBounds.Width, textBounds.Height), flags);
275
TextRenderer
.DrawText(g, groupBoxText, font, textBounds, textColor, flags);
winforms\Managed\System\WinForms\Label.cs (3)
1561
TextRenderer
.DrawText(e.Graphics, Text, Font, face, color, flags);
1567
Color disabledTextForeColor =
TextRenderer
.DisabledTextColor(this.BackColor);
1568
TextRenderer
.DrawText(e.Graphics, Text, Font, face, disabledTextForeColor, flags);
winforms\Managed\System\WinForms\Layout\LayoutUtils.cs (3)
57
Size textSize =
TextRenderer
.MeasureText(obj.ToString(), font, new Size(Int16.MaxValue, Int16.MaxValue), TextFormatFlags.SingleLine);
600
Size prefSize =
TextRenderer
.MeasureText(text, font, proposedConstraints, flags);
619
unconstrainedPreferredSize =
TextRenderer
.MeasureText(text, font, LayoutUtils.MaxSize, flags);
winforms\Managed\System\WinForms\LinkLabel.cs (3)
680
Size textSize =
TextRenderer
.MeasureText(text, alwaysUnderlined, clientSize, flags);
1446
TextRenderer
.DrawText(g, Text, font, clientRectWithPadding, brushColor, CreateTextFormatFlags(clientRectWithPadding.Size));
1499
TextRenderer
.DrawText(g, Text, font, clientRectWithPadding, color, CreateTextFormatFlags(clientRectWithPadding.Size));
winforms\Managed\System\WinForms\NumericUpDown.cs (3)
855
int textWidth =
TextRenderer
.MeasureText(GetNumberText(testNumber), this.Font).Width;
865
int shortTextWidth =
TextRenderer
.MeasureText(shortText, this.Font).Width;
888
Size digitSize =
TextRenderer
.MeasureText(ch.ToString(), this.Font);
winforms\Managed\System\WinForms\PropertyGrid.cs (2)
5273
bindingSize = (SizeF)
TextRenderer
.MeasureText(g, text, font, Size.Ceiling(size), GetTextRendererFlags() );
5291
bindingSize = (SizeF)
TextRenderer
.MeasureText(g, text, font, Size.Ceiling(size), flags );
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (1)
1941
TextRenderer
.DrawText( g, strLabel, font, textRect, textColor, PropertyGrid.MeasureTextHelper.GetTextRendererFlags() );
winforms\Managed\System\WinForms\RadioButton.cs (1)
321
Size textSize =
TextRenderer
.MeasureText(this.Text, this.Font);
winforms\Managed\System\WinForms\RadioButtonRenderer.cs (2)
152
TextRenderer
.DrawText(g, radioButtonText, font, textBounds, textColor, flags);
201
TextRenderer
.DrawText(g, radioButtonText, font, textBounds, textColor, flags);
winforms\Managed\System\WinForms\TabRenderer.cs (2)
114
TextRenderer
.DrawText(g, tabItemText, font, contentBounds, textColor, flags);
171
TextRenderer
.DrawText(g, tabItemText, font, contentBounds, textColor, flags);
winforms\Managed\System\WinForms\TextBoxBase.cs (1)
987
Size textSize =
TextRenderer
.MeasureText(this.Text, this.Font, proposedConstraints, format);
winforms\Managed\System\WinForms\TextBoxRenderer.cs (1)
121
TextRenderer
.DrawText(g, textBoxText, font, textBounds, textColor, flags);
winforms\Managed\System\WinForms\ThreadExceptionDialog.cs (1)
239
textSize = Size.Ceiling(
TextRenderer
.MeasureText(messageText, Font, textSize, TextFormatFlags.WordBreak));
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (1)
352
tabWidth =
TextRenderer
.MeasureText("\t", this.Font).Width;
winforms\Managed\System\WinForms\ToolStripItem.cs (1)
2725
cachedTextSize =
TextRenderer
.MeasureText(Text, Font);
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (1)
841
cachedShortcutSize =
TextRenderer
.MeasureText(shortcutString, Font);
winforms\Managed\System\WinForms\ToolStripRenderer.cs (2)
942
TextRenderer
.DrawText(textGraphics, text, textFont, new Rectangle(Point.Empty, textSize), textColor, textFormat);
949
TextRenderer
.DrawText(g, text, textFont, textRect, textColor, textFormat);
winforms\Managed\System\WinForms\TreeView.cs (3)
2826
Size textSize =
TextRenderer
.MeasureText(node.Text, node.TreeView.Font);
2845
TextRenderer
.DrawText(g, e.Node.Text, font, bounds, color, TextFormatFlags.Default);
2856
TextRenderer
.DrawText(g, e.Node.Text, font, bounds, color, TextFormatFlags.Default);