237 references to ControlPaint
System.Windows.Forms (201)
System\Windows\Forms\ComponentModel\COM2Interop\COM2FontConverter.cs (1)
54
_lastFont =
ControlPaint
.FontInPoints(font);
System\Windows\Forms\Control.cs (3)
981
if (
ControlPaint
.IsImageTransparent(BackgroundImage))
8172
bool imageIsTransparent =
ControlPaint
.IsImageTransparent(BackgroundImage);
8189
ControlPaint
.DrawBackgroundImage(
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.ColorOptions.cs (6)
50
colors.ButtonShadow =
ControlPaint
.Dark(_backColor);
51
colors.ButtonShadowDark =
ControlPaint
.DarkDark(_backColor);
52
colors.Highlight =
ControlPaint
.LightLight(_backColor);
56
colors.ButtonShadow =
ControlPaint
.Dark(_backColor);
57
colors.ButtonShadowDark =
ControlPaint
.LightLight(_backColor);
58
colors.Highlight =
ControlPaint
.LightLight(_backColor);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (7)
91
=>
ControlPaint
.CreateStringFormat(Control, Control.TextAlign, Control.ShowToolTip, Control.UseMnemonic);
97
=>
ControlPaint
.CreateTextFormatFlags(Control, Control.TextAlign, Control.ShowToolTip, Control.UseMnemonic);
115
ControlPaint
.DrawBorderSimple(deviceContext, bounds,
ControlPaint
.Dark(Control.BackColor));
372
ControlPaint
.DrawFocusRectangle(g, r, Control.ForeColor, Control.BackColor);
409
ControlPaint
.DrawImageDisabled(graphics, image, imageBounds, unscaledImage: true);
554
ControlPaint
.DrawBackgroundImage(
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonFlatAdapter.cs (10)
96
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
101
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
102
ControlPaint
.DrawBorderSimple(e, r, colors.ButtonShadow);
110
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
184
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
189
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
190
ControlPaint
.DrawBorderSimple(e, r, colors.ButtonShadow);
198
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
273
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
278
ControlPaint
.DrawBorderSimple(e, r, colors.WindowFrame);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonPopupAdapter.cs (2)
51
ControlPaint
.DrawBorderSimple(e, r, borderColor);
136
ControlPaint
.DrawBorderSimple(e, r, colors.Options.HighContrast ? colors.WindowText : GetContrastingBorderColor(colors.ButtonShadow));
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonStandardAdapter.cs (3)
94
ControlPaint
.DrawBackgroundImage(
173
ControlPaint
.DrawHighContrastFocusRectangle(e.GraphicsInternal, layout.Focus, highlightTextColor);
202
ControlPaint
.DrawBorderSimple(e, r, colors.ButtonShadow);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (3)
198
ControlPaint
.DrawImageColorized(g, checkImage, fullSize, checkColor);
274
ControlPaint
.DrawMixedCheckBox(e.GraphicsInternal, layout.CheckBounds, style);
289
ControlPaint
.DrawCheckBox(e.GraphicsInternal, layout.CheckBounds, style);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxPopupAdapter.cs (1)
38
ControlPaint
.DrawBorderSimple(
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\FlatButtonDarkModeRenderer.cs (1)
47
ControlPaint
.DrawFocusRectangle(
System\Windows\Forms\Controls\Buttons\ButtonInternal\DarkMode\SystemButtonDarkModeRenderer.cs (4)
156
?
ControlPaint
.Light(backColor, 0.2f)
157
:
ControlPaint
.Dark(backColor, 0.1f);
161
?
ControlPaint
.Light(backColor, 0.4f)
162
:
ControlPaint
.Dark(backColor, 0.2f);
System\Windows\Forms\Controls\Buttons\ButtonInternal\RadioButtonBaseAdapter.cs (2)
68
border =
ControlPaint
.ContrastControlDark;
215
ControlPaint
.DrawRadioButton(e.GraphicsInternal, check, style);
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (9)
81
ControlPaint
.DrawButton(graphics, bounds, ConvertToButtonState(state));
108
ControlPaint
.DrawButton(graphics, bounds, ConvertToButtonState(state));
119
ControlPaint
.DrawFocusRectangle(graphics, contentBounds);
157
ControlPaint
.DrawButton(g, bounds, ConvertToButtonState(state));
166
ControlPaint
.DrawFocusRectangle(g, contentBounds);
186
ControlPaint
.DrawButton(g, bounds, ConvertToButtonState(state));
193
ControlPaint
.DrawFocusRectangle(g, contentBounds);
265
ControlPaint
.DrawButton(graphics, bounds, ConvertToButtonState(state));
277
ControlPaint
.DrawFocusRectangle(graphics, contentBounds);
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (8)
61
ControlPaint
.DrawMixedCheckBox(g, glyphBounds, ConvertToButtonState(state));
65
ControlPaint
.DrawCheckBox(g, glyphBounds, ConvertToButtonState(state));
137
ControlPaint
.DrawMixedCheckBox(g, glyphBounds, ConvertToButtonState(state));
141
ControlPaint
.DrawCheckBox(g, glyphBounds, ConvertToButtonState(state));
151
ControlPaint
.DrawFocusRectangle(g, textBounds);
209
ControlPaint
.DrawMixedCheckBox(g, glyphBounds, ConvertToButtonState(state));
213
ControlPaint
.DrawCheckBox(g, glyphBounds, ConvertToButtonState(state));
223
ControlPaint
.DrawFocusRectangle(g, textBounds);
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (5)
83
ControlPaint
.DrawRadioButton(graphics, glyphBounds, ConvertToButtonState(state));
143
ControlPaint
.DrawRadioButton(g, glyphBounds, ConvertToButtonState(state));
151
ControlPaint
.DrawFocusRectangle(g, textBounds);
236
ControlPaint
.DrawRadioButton(g, glyphBounds, ConvertToButtonState(state));
244
ControlPaint
.DrawFocusRectangle(g, textBounds);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (6)
5674
ControlPaint
.FillReversibleRectangle(RectangleToScreen(rectInsertionBar), Color.White);
5704
HBRUSH halftone =
ControlPaint
.CreateHalftoneHBRUSH();
5723
HBRUSH halftone =
ControlPaint
.CreateHalftoneHBRUSH();
16709
ControlPaint
.DrawHighContrastFocusRectangle(g, GetGridFocusRectangle(), SystemColors.ActiveCaptionText);
16713
ControlPaint
.DrawFocusRectangle(g, GetGridFocusRectangle());
19318
ControlPaint
.DrawBorder3D(g, bounds, Border3DStyle.Sunken);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (5)
746
ControlPaint
.DrawBorder(
812
ControlPaint
.DrawBorder(
848
ControlPaint
.DrawBorderSimple(
887
ControlPaint
.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.Empty, cellStyle.ForeColor);
947
ControlPaint
.DrawFocusRectangle(
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1431
?
ControlPaint
.DarkDark(baseline)
1435
?
ControlPaint
.LightLight(baseline)
1441
?
ControlPaint
.Dark(baseline)
1445
?
ControlPaint
.Light(baseline)
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (7)
1151
ControlPaint
.DrawFocusRectangle(g, valBounds, cellStyle.BackColor, cellStyle.ForeColor);
1259
ControlPaint
.DrawMixedCheckBox(
1269
ControlPaint
.DrawCheckBox(
1299
highlight =
ControlPaint
.LightLight(backBrushColor);
1373
ControlPaint
.DrawImageColorized(
1378
?
ControlPaint
.LightLight(foreBrushColor)
1523
ControlPaint
.DrawBorderSimple(g, layout.CheckBounds, colors.ButtonShadow);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.DataGridViewColumnHeaderCellRenderer.cs (1)
43
ControlPaint
.EnforceHeaderCellDividerContrast(g, bounds);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (3)
2263
ControlPaint
.DrawFocusRectangle(g, focusBounds, Color.Empty, cellStyle.ForeColor);
2274
ControlPaint
.DrawFocusRectangle(g, focusBounds, Color.Empty, cellStyle.ForeColor);
2279
ControlPaint
.DrawFocusRectangle(g, textBounds, Color.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (1)
897
ControlPaint
.DrawFocusRectangle(g, valBounds, Color.Empty, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
1000
ControlPaint
.DrawFocusRectangle(g, focusBounds, Color.Empty, brushColor);
1053
ControlPaint
.DrawFocusRectangle(g, errorBounds, Color.Empty, brushColor);
1068
ControlPaint
.DrawFocusRectangle(g, valBounds, Color.Empty, brushColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1201
ControlPaint
.DrawFocusRectangle(graphics, bounds, Color.Empty, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (2)
1046
ControlPaint
.IsDark(backColor))
1048
using Bitmap invertedBitmap =
ControlPaint
.CreateBitmapWithInvertedForeColor(bmp, backColor);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.DataGridViewRowHeaderCellRenderer.cs (1)
30
ControlPaint
.EnforceHeaderCellDividerContrast(g, bounds);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (1)
713
ControlPaint
.DrawFocusRectangle(graphics, valBounds, Color.Empty, cellStyle.ForeColor);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
493
ControlPaint
.DrawStringDisabled(graphics, Text, Font, backColor, textRectangle, format);
522
ControlPaint
.DrawStringDisabled(
591
using CreatePenScope hpenLight = new(
ControlPaint
.Light(backColor, 1.0f));
593
using CreatePenScope hpenDark = new(
ControlPaint
.Dark(backColor, 0f));
System\Windows\Forms\Controls\GroupBox\GroupBoxRenderer.cs (2)
249
using var light =
ControlPaint
.Light(backColor, 1.0f).GetCachedPenScope();
250
using var dark =
ControlPaint
.Dark(backColor, 0f).GetCachedPenScope();
System\Windows\Forms\Controls\ImageList\ImageList.cs (2)
374
HBITMAP hMask = (HBITMAP)
ControlPaint
.CreateHBitmapTransparencyMask(bitmap);
377
HBITMAP hBitmap = (HBITMAP)
ControlPaint
.CreateHBitmapColorMask(bitmap, (IntPtr)hMask);
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (2)
158
HBITMAP hMask = (HBITMAP)
ControlPaint
.CreateHBitmapTransparencyMask(bitmap);
159
HBITMAP hBitmap = (HBITMAP)
ControlPaint
.CreateHBitmapColorMask(bitmap, hMask);
System\Windows\Forms\Controls\Labels\Label.cs (5)
909
=>
ControlPaint
.CreateStringFormat(this, TextAlign, AutoEllipsis, UseMnemonic);
924
TextFormatFlags flags =
ControlPaint
.CreateTextFormatFlags(this, TextAlign, AutoEllipsis, UseMnemonic);
989
ControlPaint
.DrawImageDisabled(g, image, loc.X, loc.Y, BackColor);
1288
ControlPaint
.DrawStringDisabled(e.GraphicsInternal, Text, Font, color, face, stringFormat);
1355
ControlPaint
.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.SunkenOuter);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (5)
138
s_iedisabledLinkColor =
ControlPaint
.Dark(DisabledColor);
1123
ControlPaint
.DrawStringDisabled(g, Text, Font, DisabledColor, ClientRectWithPadding, stringFormat);
1135
ControlPaint
.DrawStringDisabled(
1324
ControlPaint
.DrawFocusRectangle(g, Rectangle.Ceiling(focusRectangle), ForeColor, BackColor);
1330
ControlPaint
.DrawFocusRectangle(g, Rectangle.Ceiling(rect), ForeColor, BackColor);
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (3)
565
ControlPaint
.DrawCheckBox(e.Graphics, box, state);
712
ControlPaint
.DrawBlackWhiteFocusRectangle(e.Graphics, textBounds, backColor);
736
ControlPaint
.DrawFocusRectangle(e.Graphics, emptyRectangle, foreColor, backColor);
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (1)
77
ControlPaint
.DrawFocusRectangle(Graphics, UpdateBounds(Bounds, drawText: false), Item.ForeColor, Item.BackColor);
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (1)
113
ControlPaint
.DrawFocusRectangle(Graphics, Rectangle.Inflate(bounds, -1, -1), Item.ForeColor, Item.BackColor);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
1966
ControlPaint
.DrawReversibleLine(new Point(rc.X + i, rc.Y), new Point(rc.X + i, rc.Y + rc.Height), targetControl.BackColor);
1973
ControlPaint
.DrawReversibleLine(new Point(rc.X, rc.Y + i), new Point(rc.X + rc.Width, rc.Y + i), targetControl.BackColor);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.cs (2)
125
ControlPaint
.DrawFocusRectangle(g, focusRect, SystemColors.ControlText, OwnerGrid.LineColor);
129
ControlPaint
.DrawFocusRectangle(g, focusRect);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.cs (1)
7
using static System.Windows.Forms.
ControlPaint
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (13)
22
Color c =
ControlPaint
.LightLight(Control.BackColor);
23
ControlPaint
.DrawBorder(
32
ControlPaint
.DrawBorderSimple(e, r,
ControlPaint
.Dark(Control.BackColor));
39
Color c =
ControlPaint
.Light(Control.BackColor);
40
ControlPaint
.DrawBorder(
51
c =
ControlPaint
.LightLight(Control.BackColor);
52
ControlPaint
.DrawBorder(
61
ControlPaint
.DrawBorderSimple(e, r,
ControlPaint
.Dark(Control.BackColor));
79
ControlPaint
.DrawBorder(
92
if (
ControlPaint
.IsDark(backgroundColor) && image is Bitmap bitmap)
94
using Image invertedImage =
ControlPaint
.CreateBitmapWithInvertedForeColor(bitmap, Control.BackColor);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1714
ControlPaint
.InvertForeColorIfNeeded(bitmap, backgroundColor);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
14
using static System.Windows.Forms.
ControlPaint
;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
240
ControlPaint
.DrawSizeGrip(glyphGraphics, BackColor, 0, 0, s_resizeGripSize, s_resizeGripSize);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStripButton.cs (1)
36
ControlPaint
.DrawBorder(graphics, bounds,
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
698
HBRUSH halftone =
ControlPaint
.CreateHalftoneHBRUSH();
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
632
ControlPaint
.DrawBackgroundImage(
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (4)
47
ControlPaint
.DrawFocusRectangle(g, contentBounds);
84
ControlPaint
.DrawFocusRectangle(g, contentBounds);
104
ControlPaint
.DrawFocusRectangle(g, contentBounds);
135
ControlPaint
.DrawFocusRectangle(g, contentBounds);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemInternalLayout.cs (1)
92
textFormat |=
ControlPaint
.ConvertAlignmentToTextFormat(alignment);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
74
retFont =
ControlPaint
.FontInPoints(sysFont);
110
s_defaultFont =
ControlPaint
.FontInPoints(sysFont);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
711
ControlPaint
.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (7)
270
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect);
321
ControlPaint
.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width, item.Height), item.BorderStyle, (Border3DSide)item.BorderSides);
358
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect);
595
ControlPaint
.DrawBackgroundImage(
652
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect);
1113
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect);
1573
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (4)
95
s_disabledImageColorMatrix =
ControlPaint
.MultiplyColorMatrix(transparency, greyscale);
118
s_disabledImageColorMatrix =
ControlPaint
.MultiplyColorMatrix(transparency, greyscale);
870
if (
ControlPaint
.IsDark(backgroundColor))
872
Image invertedImage =
ControlPaint
.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemDarkModeRenderer.cs (2)
62
_ when color.GetBrightness() > 0.5 =>
ControlPaint
.Dark(color, 0.2f),
248
ControlPaint
.DrawBackgroundImage(
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (10)
307
ControlPaint
.DrawBorder3D(e.Graphics, bounds, Border3DStyle.Raised);
481
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, item.ContentRectangle);
526
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, fillRect);
552
ControlPaint
.DrawBorder3D(e.Graphics, new Rectangle(0, 0, item.Width - 1, item.Height - 1), item.BorderStyle, (Border3DSide)item.BorderSides);
625
ControlPaint
.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, fillRect, fillRect);
643
ControlPaint
.DrawBorderSimple(g, clientBounds, SystemColors.Highlight);
661
ControlPaint
.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, bounds, fillRect);
722
ControlPaint
.DrawBorderSimple(g, bounds, SystemColors.Highlight);
734
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect);
856
ControlPaint
.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect);
System\Windows\Forms\Controls\TreeView\TreeView.cs (1)
2834
ControlPaint
.DrawFocusRectangle(g, bounds, color, SystemColors.Highlight);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
583
ControlPaint
.DrawBorderSimple(e, editBounds, SystemColors.Control);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
7
using static System.Windows.Forms.
ControlPaint
;
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (1)
470
_font =
ControlPaint
.FontInPoints(fontInWorldUnits);
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
44
using HBITMAP mask = (HBITMAP)
ControlPaint
.CreateHBitmapTransparencyMask(bitmap);
System\Windows\Forms\Form.cs (1)
4455
ControlPaint
.DrawSizeGrip(
System\Windows\Forms\Layout\Containers\SplitContainer.cs (2)
1464
ControlPaint
.DrawFocusRectangle(g, r, ForeColor, BackColor);
1475
HBRUSH halftone =
ControlPaint
.CreateHalftoneHBRUSH();
System\Windows\Forms\Panels\Panel.cs (1)
230
ControlPaint
.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
System\Windows\Forms\Panels\TableLayoutPanel\TableLayoutPanel.cs (4)
408
ControlPaint
.PaintTableCellBorder(cellBorderStyle, g, outsideCellBounds);
473
ControlPaint
.PaintTableCellBorder(cellBorderStyle, g, tableBounds);
476
ControlPaint
.PaintTableControlBorder(cellBorderStyle, g, displayRect);
480
ControlPaint
.PaintTableControlBorder(cellBorderStyle, g, displayRect);
System\Windows\Forms\Printing\PrintPreviewControl.cs (2)
726
ControlPaint
.DrawHighContrastFocusRectangle(e.Graphics, focusRect, SystemColors.ControlText);
730
ControlPaint
.DrawFocusRectangle(e.Graphics, focusRect);
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (1)
137
ControlPaint
.DrawFocusRectangle(GraphicsInternal, Bounds, ForeColor, BackColor);
System\Windows\Forms\Rendering\TextRenderer.cs (2)
558
return
ControlPaint
.IsDarker(backColor, SystemColors.Control)
559
?
ControlPaint
.Dark(backColor)
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
662
if (
ControlPaint
.IsImageTransparent(BackgroundImage))
667
ControlPaint
.DrawBackgroundImage(
System\Windows\Forms\ToolTip\DrawToolTipEventArgs.cs (1)
101
ControlPaint
.DrawBorder(Graphics, Bounds, SystemColors.WindowFrame, ButtonBorderStyle.Solid);
System.Windows.Forms.Design (36)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (2)
588
ControlPaint
.DrawButton(g, button, ButtonState.Normal);
605
ControlPaint
.DrawFocusRectangle(g, res);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
155
ControlPaint
.DrawFocusRectangle(g, new Rectangle(2, 2, Width - 5, Height - 5));
System\Drawing\Design\ColorEditor.ColorPalette.cs (3)
383
ControlPaint
.DrawBorder(
394
ControlPaint
.DrawFocusRectangle(
401
ControlPaint
.DrawBorder(
System\Windows\Forms\Design\AnchorEditor.AnchorUI.cs (4)
192
ControlPaint
.DrawBorder3D(e.Graphics, rc, Border3DStyle.Sunken);
208
ControlPaint
.DrawButton(e.Graphics, rc, ButtonState.Normal);
282
ControlPaint
.DrawFocusRectangle(e.Graphics, rc);
288
ControlPaint
.DrawFocusRectangle(e.Graphics, rc);
System\Windows\Forms\Design\ComponentTray.cs (1)
1195
ControlPaint
.DrawReversibleFrame(_mouseDragWorkspace, BackColor, FrameStyle.Dashed);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1015
ControlPaint
.DrawFocusRectangle(e.Graphics, focusRectangle, e.ForeColor, e.BackColor);
System\Windows\Forms\Design\DockEditor.DockUI.cs (1)
302
ControlPaint
.DrawButton(e.Graphics, rc, ButtonState.Pushed);
System\Windows\Forms\Design\GroupBoxDesigner.cs (1)
82
ControlPaint
.DrawGrid(pe.Graphics, rectangle, GridSize, control.BackColor);
System\Windows\Forms\Design\PanelDesigner.cs (2)
73
ControlPaint
.Light(Control.BackColor) :
74
ControlPaint
.Dark(Control.BackColor);
System\Windows\Forms\Design\ParentControlDesigner.cs (1)
2037
ControlPaint
.DrawGrid(pe.Graphics, paintRect, GridSize, control.BackColor);
System\Windows\Forms\Design\PictureBoxDesigner.cs (2)
40
penColor =
ControlPaint
.Light(ctl.BackColor);
44
penColor =
ControlPaint
.Dark(ctl.BackColor);
System\Windows\Forms\Design\SelectionUIService.ContainerSelectionUIItem.cs (1)
60
ControlPaint
.DrawContainerGrabHandle(graphics, glyphBounds);
System\Windows\Forms\Design\SelectionUIService.SelectionUIItem.cs (10)
147
ControlPaint
.DrawSelectionFrame(graphics, false, outer, inner, borderColor);
152
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, (_sizes[0] != 0));
155
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[2] != 0);
158
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[7] != 0);
161
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[5] != 0);
164
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[6] != 0);
167
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[1] != 0);
171
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[3] != 0);
174
ControlPaint
.DrawGrabHandle(graphics, rect, fActive, _sizes[4] != 0);
178
ControlPaint
.DrawLockedFrame(graphics, outer, fActive);
System\Windows\Forms\Design\SplitterPanelDesigner.cs (2)
149
Color penColor = control.BackColor.GetBrightness() < .5 ?
ControlPaint
.Light(control.BackColor) :
ControlPaint
.Dark(control.BackColor);
System\Windows\Forms\Design\TabOrder.cs (1)
220
ControlPaint
.DrawSelectionFrame(graphics, active: false, ctlOuter, ctlInner, backColor);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
788
ControlPaint
.DrawFocusRectangle(e.Graphics, fillBounds, e.ForeColor, e.BackColor);
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
47
ControlPaint
.Light(Control.BackColor) :
48
ControlPaint
.Dark(Control.BackColor);