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