29 references to Graphics
PresentationUI (1)
MS\Internal\Documents\SignatureSummaryDialog.cs (1)
595DrawListBoxSummaryItem(e.Graphics,
System.Windows.Forms (9)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (5)
565ControlPaint.DrawCheckBox(e.Graphics, box, state); 682e.Graphics.DrawString(text, font, brush, stringBounds, format); 710ControlPaint.DrawBlackWhiteFocusRectangle(e.Graphics, textBounds, backColor); 734ControlPaint.DrawFocusRectangle(e.Graphics, emptyRectangle, foreColor, backColor); 741e.Graphics.FillRectangle(brush, emptyRectangle);
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (4)
12/// <see cref="Graphics"/> object with which the drawing should be done. 151/// For internal use to improve performance. DO NOT use this method if you modify the <see cref="Graphics"/> 161IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero; 163void IDeviceContext.ReleaseHdc() => Graphics?.ReleaseHdc();
System.Windows.Forms.Design (14)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
559Graphics g = e.Graphics;
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
272Graphics graphics = die.Graphics;
System\Drawing\Design\CursorEditor.CursorUI.cs (4)
69e.Graphics.FillRectangle(SystemBrushes.Control, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4)); 70e.Graphics.DrawRectangle(SystemPens.WindowText, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32 - 1, e.Bounds.Height - 4 - 1)); 72cursor.DrawStretched(e.Graphics, new Rectangle(e.Bounds.X + 2, e.Bounds.Y + 2, 32, e.Bounds.Height - 4)); 73e.Graphics.DrawString(text, font, brushText, e.Bounds.X + 36, e.Bounds.Y + (e.Bounds.Height - font.Height) / 2);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (8)
983e.Graphics.DrawImage(listBoxItem!.ToolboxBitmap!, 1004int textWidth = Size.Ceiling(e.Graphics.MeasureString(columnName, e.Font!, new SizeF(bounds.Width, bounds.Height))).Width; 1008e.Graphics.FillRectangle(selectedBrush, focusRectangle); 1011e.Graphics.DrawString(columnName, e.Font!, foreBrush, focusRectangle); 1018ControlPaint.DrawFocusRectangle(e.Graphics, focusRectangle, e.ForeColor, e.BackColor); 1021e.Graphics.FillRectangle(backBrush, new Rectangle(focusRectangle.Right + 1, e.Bounds.Y, e.Bounds.Width - focusRectangle.Right - 1, e.Bounds.Height)); 1025e.Graphics.FillRectangle(backBrush, new Rectangle(bounds.X, e.Bounds.Y, e.Bounds.Width - bounds.X, e.Bounds.Height)); 1027e.Graphics.DrawString(columnName, e.Font!, foreBrush, bounds);
System.Windows.Forms.Tests (3)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (1)
497e.Graphics.DrawString(
System\Windows\Forms\DrawItemEventArgsTests.cs (2)
27Assert.Equal(graphics, e.Graphics); 53Assert.Equal(graphics, e.Graphics);
WinFormsControlsTest (2)
ComboBoxesWithScrollBars.cs (1)
138e.Graphics.DrawString(
ListBoxes.cs (1)
46e.Graphics.DrawString(listBox.Items[e.Index].ToString(),