797 references to Graphics
PresentationFramework-SystemDrawing (2)
SystemDrawingExtension.cs (2)
69Graphics graphics = Graphics.FromImage(bmp);
PresentationUI (3)
MS\Internal\Documents\RMPublishingDialog.RightsTable.cs (1)
999protected override void Paint(Graphics graphics,
MS\Internal\Documents\SignatureSummaryDialog.cs (2)
542private int CalculateItemHeight(Graphics graphics, SignatureResources item) 619private void DrawListBoxSummaryItem(Graphics graphics,
System.Drawing (1)
System.Drawing.cs (1)
60[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Graphics))]
System.Windows.Forms (669)
System\Drawing\Design\PaintValueEventArgs.cs (4)
19/// <param name="graphics">The <see cref="Drawing.Graphics"/> object with which drawing should be done.</param> 21public PaintValueEventArgs(ITypeDescriptorContext? context, object? value, Graphics graphics, Rectangle bounds) 40/// <see cref="Drawing.Graphics"/> object with which painting should be done. 42public Graphics Graphics { get; }
System\Drawing\Design\UITypeEditor.cs (1)
128public void PaintValue(object? value, Graphics canvas, Rectangle rectangle)
System\Windows\Forms\Components\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
378using Graphics g = hdc.CreateGraphics();
System\Windows\Forms\Components\ImageList\ImageList.cs (5)
510public void Draw(Graphics g, Point pt, int index) => Draw(g, pt.X, pt.Y, index); 516public void Draw(Graphics g, int x, int y, int index) => Draw(g, x, y, _imageSize.Width, _imageSize.Height, index); 523public void Draw(Graphics g, int x, int y, int width, int height, int index) 661Graphics graphics = Graphics.FromImage(result);
System\Windows\Forms\Control.cs (10)
2523using Graphics g = CreateGraphics(); 4749public Graphics CreateGraphics() 4755internal Graphics CreateGraphicsInternal() 4757return Graphics.FromHwndInternal(Handle); 5219using Graphics g = Graphics.FromImage(image); 5230using Graphics destGraphics = Graphics.FromImage(bitmap); 6127using Graphics graphics = CreateGraphicsInternal(); 9008Graphics g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (9)
138/// Get <see cref="StringFormat"/> object for rendering text using GDI+ (<see cref="Graphics"/>). 149internal static void DrawDitheredFill(Graphics g, Color color1, Color color2, Rectangle bounds) 390Graphics g = e.GraphicsInternal; 418private void DrawFocus(Graphics g, Rectangle r) 426internal virtual void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout) 496Graphics? graphics = deviceContext.TryGetGraphics(create: true); 520Graphics g = e.GraphicsInternal; 740internal static ColorOptions PaintFlatRender(Graphics g, Color foreColor, Color backColor, bool enabled) => 746internal static ColorOptions PaintPopupRender(Graphics g, Color foreColor, Color backColor, bool enabled) =>
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (1)
88Graphics g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (4)
152Graphics g, 201internal static Rectangle DrawPopupBorder(Graphics g, Rectangle r, ColorData colors) 310using (Graphics offscreen = Graphics.FromImage(bitmap))
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxModernAdapter.cs (1)
82Graphics graphics = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonBackColorAnimator.cs (1)
53public override void RenderControl(Graphics graphics)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeAdapter.cs (1)
143var graphics = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ButtonDarkModeRendererBase.cs (4)
95private static void ClearBackground(Graphics graphics, Color parentBackgroundColor) 106Graphics graphics, 160Graphics graphics, 167public abstract void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (4)
26Graphics graphics, 44public override void DrawFocusIndicator(Graphics g, Rectangle contentBounds, bool isDefault) 85private void DrawButtonBorder(Graphics g, Rectangle bounds, PushButtonState state, bool isDefault) 108private static void DrawSingleBorder(Graphics g, Rectangle rect, Color color, int thickness)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\IButtonRenderer.cs (4)
19static void DrawButtonBorder(Graphics graphics, GraphicsPath path, Color borderColor, int borderWidth) 43Graphics graphics, 65Graphics graphics, 78void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault);
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernButtonDarkModeRenderer.cs (2)
83Graphics graphics, 133public override void DrawFocusIndicator(Graphics graphics, Rectangle bounds, bool isDefault)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\ModernFlatButtonRenderer.cs (2)
37Graphics graphics, 81public override void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault)
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\PopupButtonDarkModeRenderer.cs (3)
26Graphics graphics, 70Graphics graphics, 114Graphics graphics,
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (3)
36Graphics graphics, 68public override void DrawFocusIndicator(Graphics graphics, Rectangle contentBounds, bool isDefault) 140Graphics graphics,
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (1)
32Graphics g = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonModernAdapter.cs (1)
82Graphics graphics = e.GraphicsInternal;
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (18)
53public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 65/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 66public static void DrawButton(Graphics g, Rectangle bounds, PushButtonState state) => 78Graphics? graphics = deviceContext.TryGetGraphics(create: true); 105Graphics? graphics = deviceContext.TryGetGraphics(create: true); 116Graphics? graphics = deviceContext.TryGetGraphics(create: true); 124/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 125public static void DrawButton(Graphics g, Rectangle bounds, bool focused, PushButtonState state) => 128/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 129public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, bool focused, PushButtonState state) 141/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 142public static void DrawButton(Graphics g, Rectangle bounds, string? buttonText, Font? font, TextFormatFlags flags, bool focused, PushButtonState state) 170/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 172public static void DrawButton(Graphics g, Rectangle bounds, Image image, Rectangle imageBounds, bool focused, PushButtonState state) 197/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 199Graphics g, 221Graphics g, 246Graphics? graphics = deviceContext.TryGetGraphics(create: true);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (13)
38/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 39public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 50public static void DrawCheckBox(Graphics g, Point glyphLocation, CheckBoxState state) 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 85Graphics g, 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 103Graphics g, 113Graphics g, 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 157Graphics g, 181Graphics g, 230public static Size GetGlyphSize(Graphics g, CheckBoxState state) => GetGlyphSize((IDeviceContext)g, state);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (15)
39/// <inheritdoc cref="ButtonRenderer.DrawParentBackground(Graphics, Rectangle, Control)"/> 40public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 50public static void DrawRadioButton(Graphics g, Point glyphLocation, RadioButtonState state) => 65Graphics graphics, 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 89Graphics g, 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 104Graphics g, 117Graphics g, 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 157Graphics g, 181Graphics g, 204Graphics g, 251public static Size GetGlyphSize(Graphics g, RadioButtonState state)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (9)
3510using Graphics graphics = CreateGraphicsInternal(); 3728using Graphics graphics = CreateGraphicsInternal(); 4004using Graphics targetGraphics = Graphics.FromHdcInternal((IntPtr)dc); 4007Graphics bufferGraphics = buffer.Graphics; 4054using Graphics g = Graphics.FromHdcInternal((IntPtr)dc); 4130using Graphics g = Graphics.FromHdcInternal((HDC)m.WParamInternal);
System\Windows\Forms\Controls\ComboBox\ComboBox.FlatComboAdapter.cs (2)
66public virtual void DrawFlatCombo(ComboBox comboBox, Graphics g) 142protected virtual void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ComboBox\ComboBox.ModernComboAdapter.cs (10)
63Graphics graphics) 124Graphics graphics, 139Graphics graphics, 160Graphics graphics, 178Graphics graphics, 198Graphics graphics) 264Graphics graphics, 372Graphics graphics, 395Graphics graphics) 434Graphics graphics,
System\Windows\Forms\Controls\ComboBox\ComboBoxRenderer.cs (7)
30private static void DrawBackground(Graphics g, Rectangle bounds, ComboBoxState state) 52public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 62public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, ComboBoxState state) 70public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, ComboBoxState state) 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, TextFormatFlags flags, ComboBoxState state) 90public static void DrawTextBox(Graphics g, Rectangle bounds, string? comboBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, ComboBoxState state) 102public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (9)
5491using (Graphics graphics = CreateGraphicsInternal()) 5685private void DrawColHeaderShadow(Graphics g, int mouseX) 16742Graphics g = e.GraphicsInternal; 19266protected virtual void PaintBackground(Graphics graphics, Rectangle clipBounds, Rectangle gridBounds) 19337private void PaintBorder(Graphics g, Rectangle clipRect, Rectangle bounds) 19398private void PaintColumnHeaders(Graphics g, Rectangle clipBounds, bool singleBorderAdded) 19551Graphics g, 19615private void PaintRows(Graphics g, 19737private void PaintTopLeftHeaderCell(Graphics g)
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (6)
149protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 214protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 277Graphics graphics, 408private static Rectangle GetThemeMargins(Graphics g) 597Graphics graphics, 636Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.DataGridViewButtonCellRenderer.cs (1)
25public static void DrawButton(Graphics g, Rectangle bounds, int buttonState)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (18)
1477protected virtual Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 1538protected virtual Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) => Rectangle.Empty; 2307Graphics graphics, 2313Graphics g, 2521Graphics graphics, 2535Graphics graphics, 2560Graphics graphics, 2606Graphics graphics, 2626Graphics graphics, 3070Graphics graphics, 3085Graphics graphics, 3122Graphics graphics, 3527Graphics graphics, 3547private static void PaintErrorIcon(Graphics graphics, Rectangle iconBounds) 3560Graphics graphics, 3592Graphics graphics, 3632internal void PaintWork(Graphics graphics, 3959internal static bool TextFitsInBounds(Graphics graphics, string text, Font font, Size maxBounds, TextFormatFlags flags)
System\Windows\Forms\Controls\DataGridView\DataGridViewCellPaintingEventArgs.cs (3)
15Graphics graphics, 54public Graphics? Graphics { get; private set; } 172Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
444protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 506protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 636Graphics graphics, 996Graphics graphics, 1040Graphics g, 1358using (Graphics offscreen = Graphics.FromImage(bitmap))
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.DataGridViewCheckBoxCellRenderer.cs (1)
25public static void DrawCheckBox(Graphics g, Rectangle bounds, int state)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (6)
211protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 477Graphics graphics, 712Graphics graphics, 744Graphics g, 837Graphics gFlip = Graphics.FromImage(bmFlipXPThemes);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (1)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (6)
728protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 820private int GetDropDownButtonHeight(Graphics graphics, DataGridViewCellStyle cellStyle) 831protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 1160Graphics graphics, 1810Graphics graphics, 1853Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.DataGridViewComboBoxCellRenderer.cs (5)
35public static void DrawTextBox(Graphics g, Rectangle bounds, ComboBoxState state) 40public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state) 46public static void DrawBorder(Graphics g, Rectangle bounds) 60public static void DrawDropDownButton(Graphics g, Rectangle bounds, ComboBoxState state, bool rightToLeft) 79public static void DrawReadOnlyButton(Graphics g, Rectangle bounds, ComboBoxState state)
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (2)
381internal static Rectangle GetThemeMargins(Graphics g) 515Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (5)
225protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 287protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 396Graphics graphics, 678Graphics graphics, 717Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (5)
450protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 517protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 564Graphics graphics, 863Graphics graphics, 902Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (4)
1175Graphics graphics, 1410Graphics graphics, 1485Graphics graphics, 1678Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (8)
183protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 242protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 507Graphics graphics, 574Graphics graphics, 613Graphics graphics, 703using Graphics gFlip = Graphics.FromImage(bmFlipXPThemes); 1022Graphics g,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellRenderer.cs (1)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState)
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPostPaintEventArgs.cs (3)
14Graphics graphics, 44public Graphics Graphics { get; private set; } 169Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewRowPrePaintEventArgs.cs (3)
16Graphics graphics, 47public Graphics Graphics { get; private set; } 186Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (5)
256protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 323protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 386Graphics graphics, 596Graphics graphics, 640Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.cs (6)
26protected override Rectangle GetContentBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 83protected override Rectangle GetErrorIconBounds(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex) 134protected override Size GetPreferredSize(Graphics graphics, DataGridViewCellStyle cellStyle, int rowIndex, Size constraintSize) 166Graphics graphics, 205Graphics graphics, 357Graphics graphics,
System\Windows\Forms\Controls\DataGridView\DataGridViewTopLeftHeaderCell.DataGridViewTopLeftHeaderCellRenderer.cs (1)
25public static void DrawHeader(Graphics g, Rectangle bounds, int headerState)
System\Windows\Forms\Controls\DataGridView\DataGridViewUtilities.cs (1)
151Graphics graphics,
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
524Graphics graphics = e.GraphicsInternal; 612Graphics graphics = e.GraphicsInternal; 734using Graphics graphics = Graphics.FromHdcInternal((HDC)m.WParamInternal);
System\Windows\Forms\Controls\GroupBox\GroupBox.Modern.cs (5)
425Graphics graphics, 474Graphics graphics, 562Graphics graphics, 596Graphics graphics, 664Graphics graphics,
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (8)
50public static void DrawParentBackground(Graphics g, Rectangle bounds, Control childControl) 62public static void DrawGroupBox(Graphics g, Rectangle bounds, GroupBoxState state) 77public static void DrawGroupBox(Graphics g, Rectangle bounds, string? groupBoxText, Font? font, GroupBoxState state) 84Graphics g, 96Graphics g, 126Graphics g, 157private static void DrawThemedGroupBoxNoText(Graphics g, Rectangle bounds, GroupBoxState state) 246private static void DrawUnthemedGroupBoxNoText(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\Labels\Label.cs (3)
980protected void DrawImage(Graphics g, Image image, Rectangle r, ContentAlignment align) 983private void DrawImageInternal(Graphics g, Image image, Rectangle r, ContentAlignment align) 1354using Graphics g = hDC.CreateGraphics();
System\Windows\Forms\Controls\Labels\LinkLabel.cs (5)
521private Region? EnsureRun(Graphics g) 687using Graphics g = CreateGraphicsInternal(); 980Graphics g = e.GraphicsInternal; 1243Graphics g = e.GraphicsInternal; 1385private void PaintLinkBackground(Graphics g)
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (2)
37using Graphics graphics = Graphics.FromHwnd(_owningLink.Owner.Handle);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (5)
1953using Graphics graphics = CreateGraphicsInternal(); 2280using (Graphics graphics = CreateGraphicsInternal()) 2326using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal); 2381using Graphics graphics = CreateGraphicsInternal();
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (2)
19Graphics graphics, 41public Graphics Graphics { get; }
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (2)
17Graphics graphics, 33public Graphics Graphics { get; }
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (2)
17Graphics graphics, 49public Graphics Graphics { get; }
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2648using Graphics g = nmcd->nmcd.hdc.CreateGraphics(); 2712using Graphics g = nmcd->nmcd.hdc.CreateGraphics(); 5536using Graphics g = CreateGraphicsInternal(); 6074using Graphics g = nmcd->hdc.CreateGraphics(); 6976using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\ProgressBar\ProgressBarRenderer.cs (4)
27public static void DrawHorizontalBar(Graphics g, Rectangle bounds) 37public static void DrawVerticalBar(Graphics g, Rectangle bounds) 47public static void DrawHorizontalChunks(Graphics g, Rectangle bounds) 57public static void DrawVerticalChunks(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.MeasureTextHelper.cs (4)
15public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font) 18public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font, int width) 21public static SizeF MeasureTextSimple(PropertyGrid owner, Graphics g, string? text, Font font, SizeF size) 31public static SizeF MeasureText(PropertyGrid owner, Graphics g, string? text, Font font, SizeF size)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
105Graphics g, 142Graphics g,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
88internal override void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (11)
1178protected int GetLabelTextWidth(string? text, Graphics graphics, Font font) 1201public int GetValueTextWidth(string text, Graphics graphics, Font font) 1493/// Paints the label portion of this <see cref="GridEntry"/> into the given <see cref="Graphics"/> object. 1502Graphics g, 1619/// the given <see cref="Graphics"/> object. 1621private void PaintOutlineGlyph(Graphics g, Rectangle r) 1655void PaintOutlineWithExplorerTreeStyle(Graphics g, Rectangle r, HWND hwnd) 1696Graphics graphics, 1720void PaintOutlineWithClassicStyle(Graphics g, Rectangle r) 1772/// Paints the value portion of this <see cref="GridEntry"/> into the given <see cref="Graphics"/> object. 1780Graphics g,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
299using (Graphics g = CreateGraphics())
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.cs (1)
91using Graphics g = _descriptionLabel.CreateGraphicsInternal();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.cs (1)
501Graphics g,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (9)
698private static void AdjustOrigin(Graphics g, Point newOrigin, ref Rectangle r) 1092private int GetEntryLabelLength(Graphics g, GridEntry gridEntry) 1099private bool IsEntryLabelLong(Graphics g, GridEntry gridEntry) 1111Graphics g, 1171private void DrawValue(Graphics g, int row, Rectangle clipRect) 2241using Graphics g = CreateGraphicsInternal(); 2393using Graphics g = CreateGraphicsInternal(); 3305Graphics g = e.Graphics; 4164private static void ResetOrigin(Graphics g) => g.ResetTransform();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (4)
208private Bitmap GetSizeGripGlyph(Graphics g) 222using (Graphics glyphGraphics = Graphics.FromImage(_sizeGripGlyph)) 612using (Graphics g = _gridView.CreateGraphics())
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (1)
172using Graphics graphics = CreateGraphics();
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (2)
24private void DrawDashedBorer(Graphics graphics) 43private void DrawHightContrastDashedBorer(Graphics graphics)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (2)
3546using Graphics g = Graphics.FromHwndInternal(Handle);
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (9)
27public static void DrawTabItem(Graphics g, Rectangle bounds, TabItemState state) 37public static void DrawTabItem(Graphics g, Rectangle bounds, bool focused, TabItemState state) 54public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TabItemState state) 62public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, bool focused, TabItemState state) 72public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, bool focused, TabItemState state) 91public static void DrawTabItem(Graphics g, Rectangle bounds, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 111public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 121public static void DrawTabItem(Graphics g, Rectangle bounds, string? tabItemText, Font? font, TextFormatFlags flags, Image image, Rectangle imageRectangle, bool focused, TabItemState state) 142public static void DrawTabPage(Graphics g, Rectangle bounds)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (2)
2891using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\TextBox\TextBox.cs (2)
852using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (6)
2647using Graphics graphics = Graphics.FromHdc(hdc); 2687using Graphics graphics = Graphics.FromHdc(hdc); 2733private protected virtual void OnNcPaint(Graphics graphics, HDC windowHdc) 2780Graphics offscreenGraphics = buffer.Graphics;
System\Windows\Forms\Controls\TextBox\TextBoxRenderer.cs (6)
25private static void DrawBackground(Graphics g, Rectangle bounds, TextBoxState state) 42public static void DrawTextBox(Graphics g, Rectangle bounds, TextBoxState state) 51public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextBoxState state) 59public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextBoxState state) 67public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, TextFormatFlags flags, TextBoxState state) 78public static void DrawTextBox(Graphics g, Rectangle bounds, string? textBoxText, Font? font, Rectangle textBounds, TextFormatFlags flags, TextBoxState state)
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (2)
287private static Color GetAlphaBlendedColor(Graphics g, Color src, Color dest, int alpha) 305private static Color GetAlphaBlendedColorHighRes(Graphics? graphics, Color src, Color dest, int alpha)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (6)
2646using Graphics g = Graphics.FromImage(image); 3442Graphics toolstripGraphics = e.GraphicsInternal; 3488Graphics itemGraphics = itemHDC.CreateGraphics(); 3631Graphics g = e.GraphicsInternal; 3776internal void PaintInsertionMark(Graphics g)
System\Windows\Forms\Controls\ToolStrips\ToolStripArrowRenderEventArgs.cs (2)
14Graphics g, 43public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (1)
68protected override void DrawFlatComboDropDown(ComboBox comboBox, Graphics g, Rectangle dropDownRect)
System\Windows\Forms\Controls\ToolStrips\ToolStripContentPanelRenderEventArgs.cs (2)
13public ToolStripContentPanelRenderEventArgs(Graphics g, ToolStripContentPanel contentPanel) 22public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
182Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripGripRenderEventArgs.cs (1)
13public ToolStripGripRenderEventArgs(Graphics g, ToolStrip toolStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (11)
56Graphics g = e.Graphics; 136Graphics g = e.Graphics; 186Graphics g = e.Graphics; 204Graphics g = e.Graphics; 259Graphics g = e.Graphics; 288Graphics g = e.Graphics; 349Graphics g = e.Graphics; 409Graphics g = e.Graphics; 441Graphics g = e.Graphics; 462private static void DrawHightContrastDashedBorder(Graphics graphics, ToolStripItem item) 507Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemImageRenderEventArgs.cs (2)
11public ToolStripItemImageRenderEventArgs(Graphics g, ToolStripItem item, Rectangle imageRectangle) 22Graphics g,
System\Windows\Forms\Controls\ToolStrips\ToolStripItemRenderEventArgs.cs (2)
13public ToolStripItemRenderEventArgs(Graphics g, ToolStripItem item) 22public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripItemTextRenderEventArgs.cs (2)
20Graphics g, 43Graphics g,
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (1)
346internal void PaintText(Graphics g)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (3)
709using (Graphics g = Graphics.FromImage(image)) 949Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanelRenderEventArgs.cs (2)
13public ToolStripPanelRenderEventArgs(Graphics g, ToolStripPanel toolStripPanel) 22public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
54Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (22)
157Graphics g = e.Graphics; 259Graphics g = e.Graphics; 345Graphics g = e.Graphics; 401Graphics g = e.Graphics; 481Graphics g = e.Graphics; 544Graphics g = e.Graphics; 909Graphics g = e.Graphics; 952private static void FillWithDoubleGradient(Color beginColor, Color middleColor, Color endColor, Graphics g, Rectangle bounds, int firstGradientWidth, int secondGradientWidth, LinearGradientMode mode, bool flipHorizontal) 1051Graphics g = e.Graphics; 1078private void RenderPressedGradient(Graphics g, Rectangle bounds) 1105Graphics g = e.Graphics; 1117private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor) 1123private static void RenderBackgroundGradient(Graphics g, Control control, Color beginColor, Color endColor, Orientation orientation) 1190Graphics g = e.Graphics; 1214Graphics g = e.Graphics; 1341Graphics g = e.Graphics; 1403private void RenderSelectedButtonFill(Graphics g, Rectangle bounds) 1427private void RenderCheckedButtonFill(Graphics g, Rectangle bounds) 1451private void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 1539private void RenderPressedButtonFill(Graphics g, Rectangle bounds) 1564Graphics g = e.Graphics; 1645private static Point RenderArrowInternal(Graphics g, Rectangle dropDownRect, ArrowDirection direction, Brush brush)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (7)
635Graphics g = e.Graphics; 920Graphics g = e.Graphics; 943using Graphics textGraphics = Graphics.FromImage(textBmp); 1076Graphics g = e.Graphics; 1195using (Graphics graphics = Graphics.FromImage(disabledBitmap))
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (3)
15public ToolStripRenderEventArgs(Graphics g, ToolStrip toolStrip) 24Graphics g, 38public Graphics Graphics { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparatorRenderEventArgs.cs (1)
16public ToolStripSeparatorRenderEventArgs(Graphics g, ToolStripSeparator separator, bool vertical)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
517Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (6)
99private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 127Graphics g = e.Graphics; 181Graphics g = e.Graphics; 212Graphics g = e.Graphics; 362Graphics g = e.Graphics; 525Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (10)
108private static void FillBackground(Graphics g, Rectangle bounds, Color backColor) 232Graphics g = e.Graphics; 330Graphics g = e.Graphics; 434Graphics g = e.Graphics; 465Graphics g = e.Graphics; 574Graphics g = e.Graphics; 705Graphics g = e.Graphics; 748private static void RenderSeparatorInternal(Graphics g, ToolStripItem item, Rectangle bounds, bool vertical) 803private static void RenderSmall3DBorderInternal(Graphics g, Rectangle bounds, ToolBarState state, bool rightToLeft) 850Graphics g = e.Graphics;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
253using Graphics g = hdc.CreateGraphics();
System\Windows\Forms\Controls\TrackBar\TrackBarRenderer.cs (14)
28public static void DrawHorizontalTrack(Graphics g, Rectangle bounds) 38public static void DrawVerticalTrack(Graphics g, Rectangle bounds) 48public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 58public static void DrawVerticalThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 68public static void DrawLeftPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 78public static void DrawRightPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 88public static void DrawTopPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 98public static void DrawBottomPointingThumb(Graphics g, Rectangle bounds, TrackBarThumbState state) 108public static void DrawHorizontalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle) 138public static void DrawVerticalTicks(Graphics g, Rectangle bounds, int numTicks, EdgeStyle edgeStyle) 168public static Size GetLeftPointingThumbSize(Graphics g, TrackBarThumbState state) 178public static Size GetRightPointingThumbSize(Graphics g, TrackBarThumbState state) 188public static Size GetTopPointingThumbSize(Graphics g, TrackBarThumbState state) 198public static Size GetBottomPointingThumbSize(Graphics g, TrackBarThumbState state)
System\Windows\Forms\Controls\TreeView\DrawTreeNodeEventArgs.cs (2)
17Graphics graphics, 31public Graphics Graphics { get; }
System\Windows\Forms\Controls\TreeView\TreeView.cs (4)
2748using (Graphics g = nmtvcd->nmcd.hdc.CreateGraphics()) 2833using (Graphics g = nmtvcd->nmcd.hdc.CreateGraphics()) 3158using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal);
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridBoolColumn.cs (4)
78protected internal override Size GetPreferredSize(Graphics g, object value) => throw null; 82protected internal override int GetPreferredHeight(Graphics g, object value) => throw null; 96protected internal override void Paint(Graphics g, 103protected internal override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum)
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridColumnStyle.cs (5)
154protected internal abstract Size GetPreferredSize(Graphics g, object value); 158protected internal abstract int GetPreferredHeight(Graphics g, object value); 198Graphics g, 205Graphics g, 214protected internal abstract void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum);
System\Windows\Forms\Controls\Unsupported\DataGrid\DataGridTextBoxColumn.cs (6)
64Graphics g, 71Graphics g, 79protected internal override Size GetPreferredSize(Graphics g, object value) => throw null; 83protected internal override int GetPreferredHeight(Graphics g, object value) => throw null; 99Graphics g, 106protected internal override void Paint(Graphics g, Rectangle bounds, CurrencyManager source, int rowNum)
System\Windows\Forms\Controls\Unsupported\StatusBar\StatusBarDrawItemEventArgs.cs (2)
24Graphics g, 37Graphics g,
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
1111Graphics graphics = e.Graphics;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (4)
316using Graphics cachedGraphics = EnsureCachedBitmap(ClientSize.Width, ClientSize.Height); 352using Graphics cachedGraphics = EnsureCachedBitmap( 484private Graphics EnsureCachedBitmap(int width, int height) 492return Graphics.FromImage(_cachedBitmap);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (1)
31private protected override void OnNcPaint(Graphics graphics, HDC windowHdc)
System\Windows\Forms\Design\ComponentEditorForm.cs (1)
201using Graphics graphics = CreateGraphicsInternal();
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (2)
383using Graphics graphics = Graphics.FromHdcInternal(dc);
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (1)
217using Graphics g = _message.CreateGraphicsInternal();
System\Windows\Forms\Form.cs (2)
3787using Graphics graphics = Graphics.FromHwndInternal(0);
System\Windows\Forms\Input\Cursor.cs (5)
248private void DrawImageCore(Graphics graphics, Rectangle imageRect, Rectangle targetRect, bool stretch) 348/// Draws this <see cref="Cursor"/> to a <see cref="Graphics"/>. 350public void Draw(Graphics g, Rectangle targetRect) 356/// Draws this <see cref="Cursor"/> to a <see cref="Graphics"/>. 358public void DrawStretched(Graphics g, Rectangle targetRect)
System\Windows\Forms\Layout\Containers\SplitContainer.cs (3)
1027using Graphics g = CreateGraphicsInternal(); 1461private void DrawFocus(Graphics g, Rectangle r) 1555using Graphics g = CreateGraphicsInternal();
System\Windows\Forms\Layout\MeasureItemEventArgs.cs (3)
14public MeasureItemEventArgs(Graphics graphics, int index) 19public MeasureItemEventArgs(Graphics graphics, int index, int itemHeight) 30public Graphics Graphics { get; }
System\Windows\Forms\Panels\Panel.cs (1)
229using Graphics g = hDC.CreateGraphics();
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutCellPaintEventArgs.cs (1)
15Graphics g,
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (1)
355Graphics g = e.GraphicsInternal;
System\Windows\Forms\ParentBackgroundRenderer.cs (2)
13Graphics graphics, 54Graphics graphics,
System\Windows\Forms\Printing\PrintControllerWithStatusDialog.cs (2)
66public override Graphics? OnStartPage(PrintDocument document, PrintPageEventArgs e) 72Graphics? result = _underlyingController.OnStartPage(document, e);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
614private void DrawMessage(Graphics g, Rectangle rect, bool isExceptionPrinting) 635private void DrawPages(Graphics g, Rectangle rect, PreviewPageInfo[] pages, Brush backBrush)
System\Windows\Forms\Rendering\Animation\AnimatedControlRenderer.cs (3)
45/// <param name="graphics">The <see cref="Graphics"/> to paint the control.</param> 46public abstract void RenderControl(Graphics graphics); 50/// <see cref="RenderControl(Graphics)"/>.
System\Windows\Forms\Rendering\Animation\AnimatedFocusIndicatorRenderer.cs (2)
85Graphics graphics, 130public override void RenderControl(Graphics graphics)
System\Windows\Forms\Rendering\Button\AnimatedPopupButtonRenderer.cs (1)
105public override void RenderControl(Graphics graphics)
System\Windows\Forms\Rendering\Button\PopupButtonKeyCapRenderer.cs (10)
34/// Renders the key into the given <see cref="Graphics"/>. 43Graphics graphics, 156private static void DrawAmbientShadow(Graphics graphics, Metrics metrics, Palette palette) 179private static void DrawKeyBody(Graphics graphics, Metrics metrics, Palette palette) 192private static void DrawBowl(Graphics graphics, Metrics metrics, Palette palette) 265private static void DrawBorder(Graphics graphics, Metrics metrics, Palette palette) 290Graphics graphics, 316Graphics graphics, 400Graphics graphics, 431Graphics graphics,
System\Windows\Forms\Rendering\Button\PopupButtonRenderContext.cs (2)
15/// surface or a preview-image generator. A caller only needs a <see cref="Graphics"/> target and this context. 21/// Gets the bounds to render into, in device pixels of the target <see cref="Graphics"/>.
System\Windows\Forms\Rendering\CheckBox\AnimatedCheckGlyphRenderer.cs (4)
81Graphics graphics, 187public override void RenderControl(Graphics graphics) 259private static void DrawCheckmark(Graphics graphics, Rectangle bounds, Color color, float alpha) 276private static void DrawDash(Graphics graphics, Rectangle bounds, Color color, float alpha)
System\Windows\Forms\Rendering\CheckBox\AnimatedToggleSwitchRenderer.cs (4)
72public override void RenderControl(Graphics graphics) 226Graphics graphics, 268private void RenderSwitch(Graphics graphics, Rectangle rect, ToggleSwitchMetrics metrics) 408private void PaintControlBackground(Graphics graphics)
System\Windows\Forms\Rendering\ControlPaint_ModernControlButtonRenderer.cs (10)
21Graphics graphics, 158Graphics graphics, 240private static void DrawUpDownArrows(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds, double contentScaleOverride) 268private static void DrawLeftRightArrows(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds, double contentScaleOverride) 296private static void DrawEllipseSymbol(Graphics graphics, Brush brush, int centerX, int centerY, Rectangle bounds, double contentScaleOverride) 327private static void DrawOpenDropDownChevron(Graphics graphics, Brush brush, int centerX, int centerY, int size) 358private static void DrawUpArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size) 370private static void DrawDownArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size) 382private static void DrawLeftArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size) 394private static void DrawRightArrow(Graphics graphics, Brush brush, int centerX, int centerY, int size)
System\Windows\Forms\Rendering\ControlPaint.cs (65)
249using Graphics graphics = dc.CreateGraphics(); 419internal static void PrintBorder(Graphics graphics, Rectangle bounds, BorderStyle style, Border3DStyle b3dStyle) 440Graphics g, 553public static void DrawBorder(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 580Graphics graphics, 758else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 817else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 881else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 955else if (deviceContext.TryGetGraphics(create: true) is Graphics graphics) 1008public static void DrawBorder3D(Graphics graphics, Rectangle rectangle) 1018public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style) 1029public static void DrawBorder3D(Graphics graphics, Rectangle rectangle, Border3DStyle style, Border3DSide sides) 1035public static void DrawBorder3D(Graphics graphics, int x, int y, int width, int height) 1045public static void DrawBorder3D(Graphics graphics, int x, int y, int width, int height, Border3DStyle style) 1055public static void DrawBorder3D(Graphics graphics, int x, int y, int width, int height, Border3DStyle style, Border3DSide sides) 1087private static void DrawBorderComplex(Graphics graphics, Rectangle bounds, Color color, ButtonBorderStyle style) 1185Graphics? graphics = context.TryGetGraphics(create: true); 1211public static void DrawButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1217public static void DrawButton(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1232Graphics graphics, 1245Graphics graphics, 1259public static void DrawCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1265public static void DrawCheckBox(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1287public static void DrawComboButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1293public static void DrawComboButton(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1305public static void DrawContainerGrabHandle(Graphics graphics, Rectangle bounds) 1349private static void DrawFlatCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1370Graphics graphics, 1400using (Graphics g2 = Graphics.FromImage(bitmap)) 1425public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle) 1432public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) 1435internal static void DrawHighContrastFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1438internal static void DrawBlackWhiteFocusRectangle(Graphics graphics, Rectangle rectangle, Color color) 1441private static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color color, bool highContrast, bool blackAndWhite = false) 1457Graphics graphics, 1470using Graphics g2 = Graphics.FromImage(bitmap); 1511public static void DrawGrabHandle(Graphics graphics, Rectangle rectangle, bool primary, bool enabled) 1538public static void DrawGrid(Graphics graphics, Rectangle area, Size pixelsBetweenDots, Color backColor) 1581Graphics graphics, 1605internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest, Color oldColor, Color newColor) 1618public static void DrawImageDisabled(Graphics graphics, Image image, int x, int y, Color background) 1625internal static void DrawImageDisabled(Graphics graphics, Image image, Rectangle imageBounds, bool unscaledImage) 1662using (Graphics g = Graphics.FromImage(bitmap)) 1691internal static void EnforceHeaderCellDividerContrast(Graphics graphics, Rectangle bounds) 1708public static void DrawLockedFrame(Graphics graphics, Rectangle rectangle, bool primary) 1726public static void DrawMenuGlyph(Graphics graphics, Rectangle rectangle, MenuGlyph glyph) 1734Graphics graphics, 1748public static void DrawMenuGlyph(Graphics graphics, int x, int y, int width, int height, MenuGlyph glyph) 1756Graphics graphics, 1771public static void DrawMixedCheckBox(Graphics graphics, Rectangle rectangle, ButtonState state) 1774public static void DrawMixedCheckBox(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1788public static void DrawRadioButton(Graphics graphics, Rectangle rectangle, ButtonState state) 1794public static void DrawRadioButton(Graphics graphics, int x, int y, int width, int height, ButtonState state) 1870public static void DrawScrollButton(Graphics graphics, Rectangle rectangle, ScrollButton button, ButtonState state) 1877Graphics graphics, 1928Graphics graphics, 1947public static void DrawSizeGrip(Graphics graphics, Color backColor, Rectangle bounds) 1953public static void DrawSizeGrip(Graphics graphics, Color backColor, int x, int y, int width, int height) 2005Graphics graphics, 2081public static void DrawVisualStyleBorder(Graphics graphics, Rectangle bounds) 2375Graphics g, 2409internal static void PaintTableCellBorder(TableLayoutPanelCellBorderStyle borderStyle, Graphics g, Rectangle bound)
System\Windows\Forms\Rendering\DrawingEventArgs.cs (8)
21private Graphics? _graphics; 31Graphics graphics, 82internal Graphics Graphics 95internal Graphics GetOrCreateGraphicsInternal(Action<Graphics>? creationAction = null) 110_graphics = Graphics.FromHdcInternal((IntPtr)_hdc); 122internal Graphics? GetGraphics(bool create) 147internal static void CheckGraphicsForState(Graphics? graphics, DrawingEventFlags flags)
System\Windows\Forms\Rendering\DrawingEventFlags.cs (3)
12/// If true, consider the <see cref="Graphics"/> object to potentially have a clip or transform applied. 17/// Only used in <see cref="PaintEventArgs"/>. Saves the state of the <see cref="Graphics"/> at construction 24/// default when constructing via an <see cref="HDC"/> as it, by definition, has no <see cref="Graphics"/>
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (7)
31public DrawItemEventArgs(Graphics graphics, Font? font, Rectangle rect, int index, DrawItemState state) 40Graphics graphics, 83/// Gets the <see cref="Drawing.Graphics"/> object used to paint. 85public Graphics Graphics => _event.Graphics; 152/// <see cref="Graphics.Clip"/> or <see cref="Graphics.Transform"/>. 154internal Graphics GraphicsInternal => _event.GetOrCreateGraphicsInternal();
System\Windows\Forms\Rendering\GdiCache.cs (2)
36/// Gets an <see cref="Graphics"/> based off of the primary display. 43/// When disposed the <see cref="Graphics"/> object will be disposed and the underlying <see cref="HDC"/>
System\Windows\Forms\Rendering\GdiCache.ScreenGraphicsScope.cs (4)
11/// Scope that creates a wrapping <see cref="Drawing.Graphics"/> for a <see cref="ScreenDcCache.ScreenDcScope"/> 12/// and manages disposal of the <see cref="Drawing.Graphics"/> and the scope. 21public Graphics Graphics { get; } 29public static implicit operator Graphics(in ScreenGraphicsScope scope) => scope.Graphics;
System\Windows\Forms\Rendering\PaintEventArgs.cs (7)
37public PaintEventArgs(Graphics graphics, Rectangle clipRect) : this( 56Graphics graphics, 83/// Gets the <see cref="Drawing.Graphics"/> object used to paint. 85public Graphics Graphics => _event.Graphics; 106Graphics? graphics = _event.GetGraphics(create: false); 121private void SaveStateIfNeeded(Graphics graphics) 127internal Graphics GraphicsInternal => _event.GetOrCreateGraphicsInternal(SaveStateIfNeeded);
System\Windows\Forms\Rendering\RadioButton\AnimatedRadioGlyphRenderer.cs (2)
77Graphics graphics, 194public override void RenderControl(Graphics graphics)
System\Windows\Forms\Rendering\TextRenderer.cs (3)
568if (deviceContext is not Graphics g) 585/// unmodified <see cref="Graphics"/> object (i.e. the default). 604if (deviceContext is not Graphics graphics)
System\Windows\Forms\Scrolling\ScrollBarRenderer.cs (12)
27public static void DrawArrowButton(Graphics g, Rectangle bounds, ScrollBarArrowButtonState state) 37public static void DrawHorizontalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 47public static void DrawVerticalThumb(Graphics g, Rectangle bounds, ScrollBarState state) 57public static void DrawHorizontalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 67public static void DrawVerticalThumbGrip(Graphics g, Rectangle bounds, ScrollBarState state) 77public static void DrawRightHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 87public static void DrawLeftHorizontalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 97public static void DrawUpperVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 107public static void DrawLowerVerticalTrack(Graphics g, Rectangle bounds, ScrollBarState state) 117public static void DrawSizeBox(Graphics g, Rectangle bounds, ScrollBarSizeBoxState state) 127public static Size GetThumbGripSize(Graphics g, ScrollBarState state) 137public static Size GetSizeBoxSize(Graphics g, ScrollBarState state)
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (2)
20Graphics graphics, 42public Graphics Graphics { get; }
System\Windows\Forms\ToolTip\ToolTip.cs (1)
2322using Graphics graphics = paintScope.HDC.CreateGraphics();
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (3)
299public void DrawImage(Graphics g, Rectangle bounds, Image image) 314public void DrawImage(Graphics g, Rectangle bounds, ImageList imageList, int imageIndex) 738public HitTestCode HitTestBackground(Graphics g, Rectangle backgroundRectangle, Region region, Point pt, HitTestOptions options)
System.Windows.Forms.Design (90)
System\ComponentModel\Design\ByteViewer.cs (6)
122private void DrawAddress(Graphics g, int startLine, int line) 138private void DrawClient(Graphics g) 183private void DrawDump(Graphics g, ReadOnlySpan<byte> lineBuffer, int line, Span<char> charsBuffer) 203private void DrawHex(Graphics g, ReadOnlySpan<byte> lineBuffer, int line, Span<char> charsBuffer) 240private void DrawLines(Graphics g, int startLine, int linesCount) 518Graphics g = e.Graphics;
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (3)
223private int CalcItemWidth(Graphics g, ListItem item) 537using Graphics g = _listBox.CreateGraphics(); 573Graphics g = e.Graphics;
System\ComponentModel\Design\CollectionEditor.SplitButton.cs (1)
195Graphics g = pevent.Graphics;
System\ComponentModel\Design\DesignerActionPanel.cs (1)
497Graphics g = e.Graphics;
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (3)
280public override void PaintLine(Graphics g, int lineWidth, int lineHeight) 292using Graphics swatchGraphics = Graphics.FromImage(_swatch);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
57Graphics g = e.Graphics;
System\ComponentModel\Design\DesignerActionPanel.Line.cs (1)
45public virtual void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\DesignerActionPanel.PanelHeaderLine.cs (1)
98public override void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\DesignerActionPanel.SeparatorLine.cs (1)
26public override void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\DesignerActionPanel.TextBoxPropertyLine.cs (1)
288public override void PaintLine(Graphics g, int lineWidth, int lineHeight)
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (2)
361using (Graphics g = CreateGraphics()) 412using Graphics g = CreateGraphics();
System\Drawing\Design\ColorEditor.ColorPalette.cs (2)
359Graphics graphics = pe.Graphics; 414private static void PaintValue(Color color, Graphics g, Rectangle rect)
System\Drawing\Design\ColorEditor.ColorUI.cs (1)
272Graphics graphics = die.Graphics;
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (2)
309using Graphics g = Graphics.FromHwnd(m.HWnd);
System\Windows\Forms\Design\Behavior\BehaviorService.cs (2)
134public Graphics AdornerWindowGraphics 138Graphics result = _adornerWindow.CreateGraphics();
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
24private readonly Graphics _graphics; // graphics to the adornerwindow 122Graphics? graphics, 141Graphics? graphics,
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (5)
47private Graphics _graphicsTarget; // graphics object of the AdornerWindows (via BehaviorService) in drop target 1014using (Graphics g = Graphics.FromImage(_dragImage)) 1022using (Graphics g = Graphics.FromImage(_dragImage))
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
384using Graphics graphics = BehaviorService.AdornerWindowGraphics; 870using (Graphics graphics = BehaviorService.AdornerWindowGraphics)
System\Windows\Forms\Design\Behavior\SelectionManager.cs (2)
374using Graphics g = _behaviorService.AdornerWindowGraphics; 423using Graphics g = _behaviorService.AdornerWindowGraphics;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (1)
332using Graphics graphics = _behaviorService.AdornerWindowGraphics;
System\Windows\Forms\Design\ComponentTray.cs (2)
1420Graphics gr = pe.Graphics; 1969Graphics gr = CreateGraphics();
System\Windows\Forms\Design\ControlDesigner.cs (5)
1452using Graphics adornerGraphics = BehaviorService.AdornerWindowGraphics; 2041using Graphics g = Graphics.FromHdc((HDC)m.WParamInternal); 2078using Graphics graphics = Graphics.FromHwnd(m.HWnd);
System\Windows\Forms\Design\DataGridViewColumnTypeEditor.Picker.cs (1)
45using Graphics g = _typesListBox.CreateGraphics();
System\Windows\Forms\Design\DesignerUtils.cs (18)
121using Graphics g = Graphics.FromImage(s_boxImage); 188private static void DrawDragBorder(Graphics g, Size imageSize, int borderSize, Color backColor) 212public static void DrawResizeBorder(Graphics g, Region resizeBorder, Color backColor) 226public static void DrawFrame(Graphics g, Region resizeBorder, FrameStyle style, Color backColor) 246public static void DrawGrabHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 261public static void DrawNoResizeHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 276public static void DrawLockedHandle(Graphics graphics, Rectangle bounds, bool isPrimary) 300public static void DrawSelectionBorder(Graphics graphics, Rectangle bounds) 332using Graphics g = Graphics.FromImage(image); 394using Graphics gDest = Graphics.FromImage(image); 430using Graphics g = Graphics.FromImage(image); 440using (Graphics g = Graphics.FromImage(image)) 529using Graphics g = ctrl.CreateGraphics();
System\Windows\Forms\Design\FlowLayoutPanelDesigner .cs (1)
481using Graphics graphics = BehaviorService.AdornerWindowGraphics;
System\Windows\Forms\Design\PanelDesigner.cs (1)
28protected virtual void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
34private Graphics _graphics; // graphics object of the adornerwindow (via BehaviorService)
System\Windows\Forms\Design\PictureBoxDesigner.cs (1)
30private void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (1)
51public override void DoPaint(Graphics graphics)
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (1)
114public virtual void DoPaint(Graphics graphics)
System\Windows\Forms\Design\SplitterDesigner.cs (1)
23private void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\SplitterPanelDesigner.cs (4)
134using Graphics graphics = _splitterPanel.CreateGraphics(); 158using Graphics graphics = control.CreateGraphics(); 173using Graphics graphics = control.CreateGraphics(); 178internal void DrawWaterMark(Graphics g)
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (1)
832protected override void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\TabOrder.cs (1)
189private void DrawTabs(List<Control> tabs, Graphics graphics, bool fRegion)
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
59public Graphics ToolStripAdornerWindowGraphics
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
543using (Graphics g = _newItemTypes.CreateGraphics())
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
911Graphics g = bSvc.AdornerWindowGraphics;
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
234private void DrawBorder(Graphics graphics)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (6)
1764private void DrawArrow(Graphics g, Rectangle bounds) 1773private void DrawDropDown(Graphics g, Rectangle bounds, int state) 1808Graphics g = e.Graphics; 1822Graphics g = e.Graphics; 1837Graphics g = e.Graphics; 1923Graphics g = e.Graphics;
System.Windows.Forms.Primitives (25)
System\Drawing\FontExtensions.cs (1)
17public static LOGFONTW ToLogicalFont(this Font font, Graphics graphics)
System\Windows\Forms\DeviceContextExtensions.cs (13)
123internal static Graphics CreateGraphics(this HDC hdc) => Graphics.FromHdcInternal(hdc); 124internal static Graphics CreateGraphics(this CreateDcScope hdc) => Graphics.FromHdcInternal(hdc.HDC); 125internal static Graphics CreateGraphics(this GetDcScope hdc) => Graphics.FromHdcInternal(hdc.HDC); 163/// Convert the <paramref name="deviceContext"/> into a <see cref="Graphics"/> object if possible. 166/// Will create the <see cref="Graphics"/> if possible and it is not already created. 170/// Do NOT dispose of the <see cref="Graphics"/> object. If it was created, the object creating it owns it. 173internal static Graphics? TryGetGraphics(this IDeviceContext deviceContext, bool create = false) => deviceContext switch 175Graphics graphics => graphics, 176IGraphicsHdcProvider provider => (Graphics?)provider.GetGraphics(create), 188private static Graphics? AssertNoGraphics(bool create)
System\Windows\Forms\GraphicsClipScope.cs (3)
9/// Saves and restores <see cref="Graphics.Clip"/>. 14private readonly Graphics _graphics; 15public GraphicsClipScope(Graphics graphics)
System\Windows\Forms\GraphicsStateScope.cs (3)
10/// Saves and restores the entire state of a <see cref="Graphics"/>. 15private readonly Graphics _graphics; 17public GraphicsStateScope(Graphics graphics)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
186using (Graphics graphics = Graphics.FromImage(scaledBitmap))
System\Windows\Forms\SystemDrawingExtensions.cs (3)
17/// Similar to <see cref="Graphics.GetNearestColor(Color)"/>, but this retains the original color if the color 32internal static Color FindNearestColor(this Graphics graphics, Color color) 54internal static void DrawLines(this Graphics graphics, Pen pen, ReadOnlySpan<int> lines)
WindowsFormsIntegration (7)
System\Windows\Integration\HostUtils.cs (7)
179using (SD.Graphics g = SD.Graphics.FromImage(bitmap)) 197using (SD.Graphics g = SD.Graphics.FromImage(returnBitmap)) 293using (SD.Graphics graphicsTemplate = control.CreateGraphics()) 299using (SD.Graphics graphics = SD.Graphics.FromImage(chunk))