59 references to Width
System.Drawing.Common (8)
System\Drawing\Bitmap.cs (5)
112
public Bitmap(Image original) : this(original, original.
Width
, original.Height)
167
if (
Width
>= short.MaxValue || Height >= short.MaxValue)
214
if (Height > 0 &&
Width
> 0)
299
if (x < 0 || x >=
Width
)
322
if (x < 0 || x >=
Width
)
System\Drawing\Graphics.cs (1)
2036
int width = Math.Min(rect.Width, image.
Width
);
System\Drawing\Icon.cs (1)
686
bmpData = tmpBitmap.LockBits(new Rectangle(0, 0, tmpBitmap.
Width
, tmpBitmap.Height), ImageLockMode.ReadOnly, tmpBitmap.PixelFormat);
System\Drawing\Image.cs (1)
421
public Size Size => new(
Width
, Height);
System.Windows.Forms (36)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
413
graphics.DrawImage(image, imageBounds.X, imageBounds.Y, image.
Width
, image.Height);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
298
&& cacheCheckImage.
Width
== fullSize.Width
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1348
if (s_checkImage is null || s_checkImage.
Width
!= fullSize.Width || s_checkImage.Height != fullSize.Height)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (3)
831
bmFlipXPThemes.
Width
< backgroundBounds.Width || bmFlipXPThemes.
Width
> 2 * backgroundBounds.Width ||
840
g.DrawImage(bmFlipXPThemes, backgroundBounds, new Rectangle(bmFlipXPThemes.
Width
- backgroundBounds.Width, 0, backgroundBounds.Width, backgroundBounds.Height), GraphicsUnit.Pixel);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (7)
429
if (imgWidthAllowed <= 0 || img.
Width
== 0)
435
preferredSize = new Size(0, Math.Min(img.Height, decimal.ToInt32((decimal)img.Height * imgWidthAllowed / img.
Width
)));
470
preferredSize = new Size(Math.Min(img.
Width
, decimal.ToInt32((decimal)img.
Width
* imgHeightAllowed / img.Height)), 0);
495
preferredSize = new Size(img.
Width
, img.Height);
832
g.DrawImage(image, imageBounds, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, attr);
844
image is null ? icon!.Width : image.
Width
,
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (3)
394
if (value.
Width
== 0 || (value.
Width
% _owner.ImageSize.Width) != 0)
404
int nImages = value.
Width
/ _owner.ImageSize.Width;
System\Windows\Forms\Controls\Labels\Label.cs (1)
993
g.DrawImage(image, loc.X, loc.Y, image.
Width
, image.Height);
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
358
result.X += (result.Width - _image.
Width
) / 2;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (2)
95
graphics.DrawImage(invertedImage, imageBounds, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, new ImageAttributes());
99
graphics.DrawImage(image, imageBounds, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, new ImageAttributes());
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1715
graphics.DrawImage(bitmap, rectangle, 0, 0, bitmap.
Width
, bitmap.Height, GraphicsUnit.Pixel);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (1)
303
detailsWidth += _detailsButton.Image!.
Width
;
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
516
g.DrawImage(image, imageRect, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, attrs);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
712
g.DrawRectangle(SystemPens.Control, 0, 0, image.
Width
- 1, image.Height - 1);
System\Windows\Forms\OLE\WinFormsOleServices.cs (1)
51
pmedium->u.hBitmap = bitmap.GetHBITMAP().CreateCompatibleBitmap(bitmap.
Width
, bitmap.Height);
System\Windows\Forms\Rendering\ControlPaint.cs (11)
196
biWidth = bitmap.
Width
,
274
int width = bitmap.
Width
;
545
backgroundImage.
Width
,
1392
if (t_checkImage is null || t_checkImage.
Width
!= rectangle.Width || t_checkImage.Height != rectangle.Height)
1593
0, 0, image.
Width
, image.Height,
1612
g.DrawImage(image, dest, 0, 0, image.
Width
, image.Height, GraphicsUnit.Pixel, attributes, null, 0);
1619
=> DrawImageDisabled(graphics, image, new Rectangle(x, y, image.
Width
, image.Height), unscaledImage: false);
1661
using Bitmap bitmap = new(image.
Width
, image.Height);
2468
for (int x = 0; x < bitmap.
Width
; ++x)
2485
Bitmap result = new(bitmap.
Width
, bitmap.Height, bitmap.PixelFormat);
2488
for (int x = 0; x < bitmap.
Width
; ++x)
System.Windows.Forms.Design (15)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
133
int imageWidth = arrowBitmap.
Width
;
System\Drawing\Design\ToolboxItem.cs (1)
605
if ((itemBitmap.
Width
!= s_iconWidth || itemBitmap.Height != s_iconHeight))
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
159
topRight.X -= (GlyphImageOpened.
Width
+ CONTROLOVERLAP_X);
161
_bounds = (new Rectangle(topRight.X, topRight.Y, GlyphImageOpened.
Width
, GlyphImageOpened.Height));
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
739
_dragComponents[_primaryComponentIndex].dragImage.
Width
,
1029
_dragComponents[i].dragImage.
Width
, _dragComponents[i].dragImage.Height);
1034
new Rectangle(0, 0, _dragComponents[i].dragImage.
Width
, _dragComponents[i].dragImage.Height),
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
983
listBoxItem.ToolboxBitmap!.
Width
,
987
bounds.Width -= listBoxItem.ToolboxBitmap.
Width
+ 2 * OWNERDRAWITEMIMAGEBUFFER;
988
bounds.X += listBoxItem.ToolboxBitmap.
Width
+ 2 * OWNERDRAWITEMIMAGEBUFFER;
1161
_selectedColumns.HorizontalExtent = SelectedColumnsItemBitmap.
Width
+ 2 * OWNERDRAWITEMIMAGEBUFFER + maxItemWidth + OWNERDRAWHORIZONTALBUFFER;
System\Windows\Forms\Design\DesignerUtils.cs (4)
408
image.
Width
,
439
image.SetPixel(image.
Width
/ 2, image.Height / 2, testColor);
452
return !image.GetPixel(image.
Width
/ 2, image.Height / 2).Equals(testColor);
671
BitmapData data = b.LockBits(new Rectangle(0, 0, b.
Width
, b.Height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb);