193 references to ControlPaint
System.Windows.Forms (192)
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (13)
136return ControlPaint.CreateStringFormat( Control, Control.TextAlign, Control.ShowToolTip, Control.UseMnemonic ); 143return ControlPaint.CreateTextFormatFlags( Control, Control.TextAlign, Control.ShowToolTip, Control.UseMnemonic ); 158ControlPaint.DrawBorder(g, bounds, ControlPaint.Dark(Control.BackColor), ButtonBorderStyle.Solid); 478ControlPaint.DrawBorder(g, r, c, ButtonBorderStyle.Solid); 543ControlPaint.DrawFocusRectangle(g, r, Control.ForeColor, Control.BackColor); 584ControlPaint.DrawImageDisabled(graphics, image, imageBounds, Control.BackColor, true /* unscaled image*/); 758colors.buttonShadow = ControlPaint.Dark(backColor); 759colors.buttonShadowDark = ControlPaint.DarkDark(backColor); 760colors.highlight = ControlPaint.LightLight(backColor); 763colors.buttonShadow = ControlPaint.Dark(backColor); 764colors.buttonShadowDark = ControlPaint.LightLight(backColor); 765colors.highlight = ControlPaint.LightLight(backColor);
winforms\Managed\System\WinForms\ButtonInternal\ButtonPopupAdapter.cs (1)
143ControlPaint.DrawBorder(g, r, colors.options.highContrast ? colors.windowText : colors.buttonShadow, ButtonBorderStyle.Solid);
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (3)
127ControlPaint.DrawBackgroundImage(e.Graphics, Control.BackgroundImage, Color.Transparent, Control.BackgroundImageLayout, Control.ClientRectangle, bounds, Control.DisplayRectangle.Location, Control.RightToLeft); 192ControlPaint.DrawHighContrastFocusRectangle(g, layout.focus, highlightTextColor); 216ControlPaint.DrawBorder(g, r, colors.buttonShadow, ButtonBorderStyle.Solid);
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (3)
169ControlPaint.DrawImageColorized(g, checkImage, fullSize, checkColor); 225ControlPaint.DrawMixedCheckBox(g, layout.checkBounds, style); 233ControlPaint.DrawCheckBox(g, layout.checkBounds, style);
winforms\Managed\System\WinForms\ButtonInternal\RadioButtonBaseAdapter.cs (2)
68border = ControlPaint.ContrastControlDark; 191ControlPaint.DrawRadioButton(g, check, style);
winforms\Managed\System\WinForms\ButtonRenderer.cs (9)
102ControlPaint.DrawButton(g, bounds, ConvertToButtonState(state)); 124ControlPaint.DrawButton(g, bounds, ConvertToButtonState(state)); 129ControlPaint.DrawFocusRectangle(g, contentBounds); 174ControlPaint.DrawButton(g, bounds, ConvertToButtonState(state)); 182ControlPaint.DrawFocusRectangle(g, contentBounds); 203ControlPaint.DrawButton(g, bounds, ConvertToButtonState(state)); 209ControlPaint.DrawFocusRectangle(g, contentBounds); 244ControlPaint.DrawButton(g, bounds, ConvertToButtonState(state)); 253ControlPaint.DrawFocusRectangle(g, contentBounds);
winforms\Managed\System\WinForms\CheckBoxRenderer.cs (8)
113ControlPaint.DrawMixedCheckBox(g, glyphBounds, ConvertToButtonState(state)); 116ControlPaint.DrawCheckBox(g, glyphBounds, ConvertToButtonState(state)); 156ControlPaint.DrawMixedCheckBox(g, glyphBounds, ConvertToButtonState(state)); 159ControlPaint.DrawCheckBox(g, glyphBounds, ConvertToButtonState(state)); 168ControlPaint.DrawFocusRectangle(g, textBounds); 205ControlPaint.DrawMixedCheckBox(g, glyphBounds, ConvertToButtonState(state)); 208ControlPaint.DrawCheckBox(g, glyphBounds, ConvertToButtonState(state)); 217ControlPaint.DrawFocusRectangle(g, textBounds);
winforms\Managed\System\WinForms\CheckedListBox.cs (3)
715ControlPaint.DrawCheckBox(e.Graphics, box, state); 840ControlPaint.DrawFocusRectangle(e.Graphics, textBounds, foreColor, backColor); 860ControlPaint.DrawFocusRectangle(e.Graphics, emptyRectangle, foreColor, backColor);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2FontConverter.cs (2)
76lastFont = ControlPaint.FontInPoints(font); 118bool changed = ControlPaint.FontToIFont(lastFont, nativeFont);
winforms\Managed\System\WinForms\Control.cs (4)
1209if (ControlPaint.IsImageTransparent(BackgroundImage)) 9611if (ControlPaint.IsImageTransparent(BackgroundImage)) { 9624if (ControlPaint.IsImageTransparent(BackgroundImage)) { 9628ControlPaint.DrawBackgroundImage(e.Graphics, BackgroundImage, backColor, BackgroundImageLayout, ClientRectangle, rectangle, scrollLocation, RightToLeft);
winforms\Managed\System\WinForms\ControlPaint.cs (4)
434ControlPaint.DrawBorder(graphics, bounds, Color.FromKnownColor(KnownColor.WindowFrame), ButtonBorderStyle.Solid); 437ControlPaint.DrawBorder3D(graphics, bounds, b3dStyle); 2722StringFormat stringFormat = ControlPaint.StringFormatForAlignment( textAlign ); 2761TextFormatFlags flags = ControlPaint.TextFormatFlagsForAlignmentGDI( textAlign );
winforms\Managed\System\WinForms\DataGrid.cs (5)
5858IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 7133ControlPaint.DrawBorder3D(g, boundingRect, Border3DStyle.RaisedInner); 7266ControlPaint.DrawBorder3D(g, textBounds, Border3DStyle.RaisedInner); 7294ControlPaint.DrawBorder3D(g, bounds, style ); 7344ControlPaint.DrawBorder3D(g, layout.TopLeftHeader, Border3DStyle.RaisedInner);
winforms\Managed\System\WinForms\DataGridBoolColumn.cs (2)
403ControlPaint.DrawMixedCheckBox(g, box, ButtonState.Checked); 405ControlPaint.DrawCheckBox(g, box, checkedState);
winforms\Managed\System\WinForms\DataGridCaption.cs (2)
511ControlPaint.DrawBorder3D(g, backButtonRect, 529ControlPaint.DrawBorder3D(g, downButtonRect,
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (2)
592ControlPaint.DrawBorder3D(g, insideBounds, Border3DStyle.RaisedInner); 734ControlPaint.DrawFocusRectangle(g, textBounds, ((SolidBrush)textBrush).Color, ((SolidBrush)GetBackBrush()).Color);
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (4)
792ControlPaint.DrawBorder(g, valBounds, SystemColors.Control, 882ControlPaint.DrawBorder(g, 944ControlPaint.DrawFocusRectangle(g, Rectangle.Inflate(valBounds, -1, -1), Color.Empty, SystemColors.Control); 1002ControlPaint.DrawFocusRectangle(g,
winforms\Managed\System\WinForms\DataGridViewCell.cs (4)
1690darkPen = this.DataGridView.GetCachedPen(ControlPaint.DarkDark(baseline)); 1698lightPen = this.DataGridView.GetCachedPen(ControlPaint.LightLight(baseline)); 1709darkPen = this.DataGridView.GetCachedPen(ControlPaint.Dark(baseline)); 1717lightPen = this.DataGridView.GetCachedPen(ControlPaint.Light(baseline));
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (6)
1246ControlPaint.DrawFocusRectangle(g, valBounds, Color.Empty, br.Color); 1348ControlPaint.DrawMixedCheckBox(g, checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height, bs); 1352ControlPaint.DrawCheckBox(g, checkBoxX, checkBoxY, checkBoxSize.Width, checkBoxSize.Height, bs); 1373highlight = ControlPaint.LightLight(backBrush.Color); 1453ControlPaint.DrawImageColorized(g, checkImage, fullSize, checkState == CheckState.Indeterminate ? ControlPaint.LightLight(foreBrush.Color) : foreBrush.Color);
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (7)
2335buttonShadow = ControlPaint.Dark(color); 2336highlight = ControlPaint.LightLight(color); 2339buttonShadowDark = ControlPaint.LightLight(color); 2343buttonShadowDark = ControlPaint.DarkDark(color); 2548ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, br.Color); 2559ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, br.Color); 2564ControlPaint.DrawFocusRectangle(g, textBounds, Color.Empty, br.Color);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (1)
952ControlPaint.DrawFocusRectangle(g, valBounds, Color.Empty, br.Color);
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (3)
1084ControlPaint.DrawFocusRectangle(g, focusBounds, Color.Empty, br.Color); 1121ControlPaint.DrawFocusRectangle(g, errorBounds, Color.Empty, br.Color); 1147ControlPaint.DrawFocusRectangle(g, valBounds, Color.Empty, br.Color);
winforms\Managed\System\WinForms\DataGridViewMethods.cs (6)
5737ControlPaint.FillReversibleRectangle(RectangleToScreen(rectInsertionBar), Color.White); 5768IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 5789IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 17156ControlPaint.DrawHighContrastFocusRectangle(g, this.GetGridFocusRectangle(), SystemColors.ActiveCaptionText); 17160ControlPaint.DrawFocusRectangle(g, this.GetGridFocusRectangle()); 19873ControlPaint.DrawBorder3D(g, bounds, Border3DStyle.Sunken);
winforms\Managed\System\WinForms\DataGridViewRow.cs (1)
1300ControlPaint.DrawFocusRectangle(graphics, bounds, Color.Empty, backColor);
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (1)
745ControlPaint.DrawFocusRectangle(graphics, valBounds, Color.Empty, br.Color);
winforms\Managed\System\WinForms\DrawItemEvent.cs (1)
198ControlPaint.DrawFocusRectangle(Graphics, rect, ForeColor, BackColor);
winforms\Managed\System\WinForms\DrawListViewItemEventArgs.cs (1)
141ControlPaint.DrawFocusRectangle(graphics, UpdateBounds(focusBounds, false /*drawText*/), item.ForeColor, item.BackColor);
winforms\Managed\System\WinForms\DrawListViewSubItemEventArgs.cs (1)
185ControlPaint.DrawFocusRectangle(graphics, Rectangle.Inflate(bounds, -1, -1), item.ForeColor, item.BackColor);
winforms\Managed\System\WinForms\DrawToolTipEventArgs.cs (1)
159ControlPaint.DrawBorder(graphics, bounds, SystemColors.WindowFrame, ButtonBorderStyle.Solid);
winforms\Managed\System\WinForms\ErrorProvider.cs (1)
1700mask = ControlPaint.CreateHBitmapTransparencyMask(bitmap);
winforms\Managed\System\WinForms\FontDialog.cs (1)
699font = ControlPaint.FontInPoints(fontInWorldUnits);
winforms\Managed\System\WinForms\Form.cs (1)
5070ControlPaint.DrawSizeGrip(e.Graphics, BackColor, sz.Width - SizeGripSize, sz.Height - SizeGripSize, SizeGripSize, SizeGripSize);
winforms\Managed\System\WinForms\GDI\TextRenderer.cs (2)
347if (ControlPaint.IsDarker(backColor, SystemColors.Control)) { 348disabledTextForeColor = ControlPaint.Dark(backColor);
winforms\Managed\System\WinForms\GroupBox.cs (4)
557Pen light = new Pen(ControlPaint.Light(backColor, 1.0f)); 558Pen dark = new Pen(ControlPaint.Dark(backColor, 0f)); 582ControlPaint.DrawStringDisabled(graphics, Text, Font, backColor, textRectangle, format); 608ControlPaint.DrawStringDisabled(wg, Text, Font, backColor, textRectangle, ((TextFormatFlags) flags));
winforms\Managed\System\WinForms\GroupBoxRenderer.cs (2)
225Pen light = new Pen(ControlPaint.Light(backColor, 1.0f)); 226Pen dark = new Pen(ControlPaint.Dark(backColor, 0f));
winforms\Managed\System\WinForms\ImageList.cs (4)
497IntPtr hMask = ControlPaint.CreateHBitmapTransparencyMask(bitmap); // Calls GDI to create Bitmap. 498IntPtr hBitmap = ControlPaint.CreateHBitmapColorMask(bitmap, hMask); // Calls GDI+ to create Bitmap. Need to add handle to HandleCollector. 1169IntPtr hMask = ControlPaint.CreateHBitmapTransparencyMask(bitmap); 1170IntPtr hBitmap = ControlPaint.CreateHBitmapColorMask(bitmap, hMask);
winforms\Managed\System\WinForms\Label.cs (5)
1125return ControlPaint.CreateStringFormat( this, this.TextAlign, this.AutoEllipsis, this.UseMnemonic ); 1141TextFormatFlags flags = ControlPaint.CreateTextFormatFlags( this, this.TextAlign, this.AutoEllipsis, this.UseMnemonic ); 1196ControlPaint.DrawImageDisabled(g, image, loc.X, loc.Y, BackColor); 1553ControlPaint.DrawStringDisabled(e.Graphics, Text, Font, color, face, stringFormat); 1624ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.SunkenOuter);
winforms\Managed\System\WinForms\LinkLabel.cs (5)
191iedisabledLinkColor = ControlPaint.Dark(DisabledColor); 1250ControlPaint.DrawStringDisabled(e.Graphics, Text, Font, DisabledColor, ClientRectWithPadding, stringFormat); 1264ControlPaint.DrawStringDisabled(e.Graphics, Text, Font, foreColor, clientRectWidthPadding, CreateTextFormatFlags(clientRectWidthPadding.Size)); 1461ControlPaint.DrawFocusRectangle(g, focusRect, ForeColor, BackColor); 1465ControlPaint.DrawFocusRectangle(g, Rectangle.Ceiling(rect), ForeColor, BackColor);
winforms\Managed\System\WinForms\Panel.cs (1)
296ControlPaint.PrintBorder(g, new Rectangle(Point.Empty, Size), BorderStyle, Border3DStyle.Sunken);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (2)
547format.Alignment = ControlPaint.TranslateAlignment(ContentAlignment.MiddleCenter); 548format.LineAlignment = ControlPaint.TranslateLineAlignment(ContentAlignment.MiddleCenter);
winforms\Managed\System\WinForms\PropertyGrid.cs (2)
2348ControlPaint.DrawReversibleLine(new Point(rc.X+i, rc.Y), new Point(rc.X+i, rc.Y+rc.Height), ctlDrawTo.BackColor); 2353ControlPaint.DrawReversibleLine(new Point(rc.X, rc.Y+i), new Point(rc.X+rc.Width, rc.Y+i), ctlDrawTo.BackColor);
winforms\Managed\System\WinForms\PropertyGridInternal\CategoryGridEntry.cs (2)
219ControlPaint.DrawFocusRectangle(g, focusRect, SystemColors.ControlText, OwnerGrid.LineColor); 222ControlPaint.DrawFocusRectangle(g, focusRect);
winforms\Managed\System\WinForms\PropertyGridInternal\DropDownButton.cs (14)
114ControlPaint.DrawFocusRectangle(pevent.Graphics, dropDownButtonRect, ForeColor, BackColor); 159Color c = ControlPaint.LightLight(Control.BackColor); 160ControlPaint.DrawBorder(g, r, 167ControlPaint.DrawBorder(g, r, ControlPaint.Dark(Control.BackColor), ButtonBorderStyle.Solid); 172Color c = ControlPaint.Light(Control.BackColor); 173ControlPaint.DrawBorder(g, r, 183c = ControlPaint.LightLight(Control.BackColor); 184ControlPaint.DrawBorder(g, inside, 191ControlPaint.DrawBorder(g, r, ControlPaint.Dark(Control.BackColor), ButtonBorderStyle.Solid); 205ControlPaint.DrawBorder(pevent.Graphics, rect, 215ControlPaint.DrawImageReplaceColor(graphics, image, imageBounds, Color.Black, SystemColors.HighlightText); 218ControlPaint.DrawImageReplaceColor(graphics, image, imageBounds, Color.Black, Control.ForeColor);
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (2)
2448ControlPaint.DrawFocusRectangle(g, new Rectangle(offset_2Units, offset_2Units, Size.Width - doubleOffset, Size.Height - doubleOffset)); 5654ControlPaint.DrawSizeGrip(glyphGraphics, BackColor, 0, 0, ResizeGripSize, ResizeGripSize);
winforms\Managed\System\WinForms\RadioButtonRenderer.cs (5)
111ControlPaint.DrawRadioButton(g, glyphBounds, ConvertToButtonState(state)); 148ControlPaint.DrawRadioButton(g, glyphBounds, ConvertToButtonState(state)); 155ControlPaint.DrawFocusRectangle(g, textBounds); 197ControlPaint.DrawRadioButton(g, glyphBounds, ConvertToButtonState(state)); 204ControlPaint.DrawFocusRectangle(g, textBounds);
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
762if (ControlPaint.IsImageTransparent(BackgroundImage)) { 765ControlPaint.DrawBackgroundImage(e.Graphics, BackgroundImage, BackColor, BackgroundImageLayout, displayRect, displayRect, displayRect.Location);
winforms\Managed\System\WinForms\SplitContainer.cs (2)
1623ControlPaint.DrawFocusRectangle(g, r, this.ForeColor, this.BackColor); 1637IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH();
winforms\Managed\System\WinForms\Splitter.cs (1)
774IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH();
winforms\Managed\System\WinForms\TableLayoutPanel.cs (4)
447ControlPaint.PaintTableCellBorder(cellBorderStyle, g, outsideCellBounds); 478ControlPaint.PaintTableCellBorder(cellBorderStyle, g, tableBounds); 480ControlPaint.PaintTableControlBorder(cellBorderStyle, g, displayRect); 483ControlPaint.PaintTableControlBorder(cellBorderStyle, g, displayRect);
winforms\Managed\System\WinForms\TabPage.cs (1)
725ControlPaint.DrawBackgroundImage(e.Graphics, BackgroundImage, bkcolor, BackgroundImageLayout, inflateRect, inflateRect, DisplayRectangle.Location);
winforms\Managed\System\WinForms\TabRenderer.cs (4)
74ControlPaint.DrawFocusRectangle(g, contentBounds); 117ControlPaint.DrawFocusRectangle(g, contentBounds); 139ControlPaint.DrawFocusRectangle(g, contentBounds); 174ControlPaint.DrawFocusRectangle(g, contentBounds);
winforms\Managed\System\WinForms\ToolStripItem.cs (2)
4684textFormat |= ControlPaint.TranslateAlignmentForGDI(alignment); 4685textFormat |= ControlPaint.TranslateLineAlignmentForGDI(alignment);
winforms\Managed\System\WinForms\ToolStripManager.cs (2)
78retFont = ControlPaint.FontInPoints(sysFont); 107defaultFont = ControlPaint.FontInPoints(sysFont);
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (1)
820ControlPaint.DrawCaptionButton(g, new Rectangle(Point.Empty, image.Size), (CaptionButton)buttonToUse, ButtonState.Flat);
winforms\Managed\System\WinForms\ToolStripProfessionalRenderer.cs (7)
250ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 291ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0,0,item.Width, item.Height), item.BorderStyle, (Border3DSide)item.BorderSides); 323ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 530ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 573ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 963ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect); 1377ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, bounds, fillRect);
winforms\Managed\System\WinForms\ToolStripRenderer.cs (1)
102disabledImageColorMatrix = ControlPaint.MultiplyColorMatrix(transparency, greyscale);
winforms\Managed\System\WinForms\ToolStripSystemRenderer.cs (8)
236ControlPaint.DrawBorder3D(e.Graphics, bounds, Border3DStyle.Raised); 379ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, item.ContentRectangle); 419ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, item.ContentRectangle, fillRect); 446ControlPaint.DrawBorder3D(e.Graphics, new Rectangle(0,0,item.Width-1, item.Height-1), item.BorderStyle, (Border3DSide)item.BorderSides); 501ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, fillRect, fillRect); 522ControlPaint.DrawBackgroundImage(g, splitButton.BackgroundImage, splitButton.BackColor, splitButton.BackgroundImageLayout, bounds, fillRect); 585ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect); 705ControlPaint.DrawBackgroundImage(g, item.BackgroundImage, item.BackColor, item.BackgroundImageLayout, fillRect, fillRect);
winforms\Managed\System\WinForms\TreeView.cs (1)
2844 ControlPaint.DrawFocusRectangle(g, bounds, color, SystemColors.Highlight);
winforms\Managed\System\WinForms\UpDownBase.cs (3)
856ControlPaint.DrawBorder(e.Graphics, editBounds, SystemColors.Control, ButtonBorderStyle.Solid); 1721ControlPaint.DrawScrollButton(e.Graphics, 1726ControlPaint.DrawScrollButton(e.Graphics,
System.Windows.Forms.DataVisualization (1)
WinForm\ChartWinControl.cs (1)
2147ControlPaint.DrawFocusRectangle(g, new Rectangle(1, 1, Size.Width - 2, Size.Height - 2));