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