2 types derived from Image
System.Drawing.Common (2)
Special\NotSupported.cs (2)
13public sealed partial class Bitmap : System.Drawing.Image 2533public sealed partial class Metafile : System.Drawing.Image
923 references to Image
Accessibility_Core_App (46)
DataControls.Designer.cs (9)
113this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image"))); 130this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image"))); 139this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image"))); 148this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image"))); 176this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image"))); 185this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image"))); 198this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); 212this.toolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image"))); 220this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
Menu_Toolbars_controls.Designer.cs (17)
164newToolStripMenuItem.Image = (Image)resources.GetObject("newToolStripMenuItem.Image"); 173openToolStripMenuItem.Image = (Image)resources.GetObject("openToolStripMenuItem.Image"); 187saveToolStripMenuItem.Image = (Image)resources.GetObject("saveToolStripMenuItem.Image"); 207printToolStripMenuItem.Image = (Image)resources.GetObject("printToolStripMenuItem.Image"); 216printPreviewToolStripMenuItem.Image = (Image)resources.GetObject("printPreviewToolStripMenuItem.Image"); 262cutToolStripMenuItem.Image = (Image)resources.GetObject("cutToolStripMenuItem.Image"); 271copyToolStripMenuItem.Image = (Image)resources.GetObject("copyToolStripMenuItem.Image"); 280pasteToolStripMenuItem.Image = (Image)resources.GetObject("pasteToolStripMenuItem.Image"); 435toolStripDropDownButton1.Image = (Image)resources.GetObject("toolStripDropDownButton1.Image"); 461toolStripSplitButton1.Image = (Image)resources.GetObject("toolStripSplitButton1.Image"); 514newToolStripButton.Image = (Image)resources.GetObject("newToolStripButton.Image"); 528toolStripButton1.Image = (Image)resources.GetObject("toolStripButton1.Image"); 538toolStripButton2.Image = (Image)resources.GetObject("toolStripButton2.Image"); 550toolStripButton3.Image = (Image)resources.GetObject("toolStripButton3.Image"); 561toolStripButton4.Image = (Image)resources.GetObject("toolStripButton4.Image"); 573toolStripButton5.Image = (Image)resources.GetObject("toolStripButton5.Image"); 584toolStripButton6.Image = (Image)resources.GetObject("toolStripButton6.Image");
ToolStripContainer.Designer.cs (20)
153this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); 164this.toolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image"))); 179this.newToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripButton.Image"))); 188this.openToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripButton.Image"))); 197this.saveToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripButton.Image"))); 206this.printToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripButton.Image"))); 220this.cutToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripButton.Image"))); 229this.copyToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripButton.Image"))); 238this.pasteToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripButton.Image"))); 252this.helpToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("helpToolStripButton.Image"))); 293this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); 308this.toolStripSplitButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton2.Image"))); 382this.newToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("newToolStripMenuItem.Image"))); 390this.openToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("openToolStripMenuItem.Image"))); 403this.saveToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("saveToolStripMenuItem.Image"))); 422this.printToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printToolStripMenuItem.Image"))); 430this.printPreviewToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("printPreviewToolStripMenuItem.Image"))); 482this.cutToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("cutToolStripMenuItem.Image"))); 490this.copyToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("copyToolStripMenuItem.Image"))); 498this.pasteToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("pasteToolStripMenuItem.Image")));
DesignSurface (3)
MainForm.Designer.cs (3)
213this.ToolStripMenuItemCut.Image = ((System.Drawing.Image)(resources.GetObject("ToolStripMenuItemCut.Image"))); 223this.ToolStripMenuItemCopy.Image = ((System.Drawing.Image)(resources.GetObject("ToolStripMenuItemCopy.Image"))); 233this.ToolStripMenuItemPaste.Image = ((System.Drawing.Image)(resources.GetObject("ToolStripMenuItemPaste.Image")));
Microsoft.VisualBasic.Forms (4)
Microsoft\VisualBasic\MyServices\ClipboardProxy.vb (4)
122Public Function GetImage() As Image 187''' Saves the passed in <see cref="Image"/> to the clipboard. 189''' <param name="image">The <see cref="Image"/> to be saved.</param> 190Public Sub SetImage(image As Image)
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
34return data is Image;
PresentationUI (5)
MS\Internal\Documents\Application\DocumentProperties.cs (2)
83internal Image Image 419private Image _image = null;
MS\Internal\Documents\SignatureResourceHelper.cs (3)
77internal static Drawing.Image GetImageFromStatus( 98return (Drawing.Image)Resources.ResourceManager.GetObject(resourceName); 353public System.Drawing.Image _displayImage;
System.Drawing (1)
System.Drawing.cs (1)
65[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Image))]
System.Drawing.Common (69)
Special\NotSupported.cs (69)
15public Bitmap(System.Drawing.Image original) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 16public Bitmap(System.Drawing.Image original, System.Drawing.Size newSize) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 17public Bitmap(System.Drawing.Image original, int width, int height) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 489public void DrawImage(System.Drawing.Image image, System.Drawing.Point point) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 490public void DrawImage(System.Drawing.Image image, System.Drawing.PointF point) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 491public void DrawImage(System.Drawing.Image image, System.Drawing.PointF[] destPoints) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 492public void DrawImage(System.Drawing.Image image, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 493public void DrawImage(System.Drawing.Image image, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 494public void DrawImage(System.Drawing.Image image, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 495public void DrawImage(System.Drawing.Image image, System.Drawing.PointF[] destPoints, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback, int callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 496public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 497public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 498public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 499public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 500public void DrawImage(System.Drawing.Image image, System.Drawing.Point[] destPoints, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback, int callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 501public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 502public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 503public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 504public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 505public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttr, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 506public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs, System.Drawing.Graphics.DrawImageAbort? callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 507public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 508public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 509public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs, System.Drawing.Graphics.DrawImageAbort? callback) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 510public void DrawImage(System.Drawing.Image image, System.Drawing.Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, System.Drawing.GraphicsUnit srcUnit, System.Drawing.Imaging.ImageAttributes? imageAttrs, System.Drawing.Graphics.DrawImageAbort? callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 511public void DrawImage(System.Drawing.Image image, System.Drawing.RectangleF rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 512public void DrawImage(System.Drawing.Image image, System.Drawing.RectangleF destRect, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 513public void DrawImage(System.Drawing.Image image, int x, int y) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 514public void DrawImage(System.Drawing.Image image, int x, int y, System.Drawing.Rectangle srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 515public void DrawImage(System.Drawing.Image image, int x, int y, int width, int height) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 516public void DrawImage(System.Drawing.Image image, float x, float y) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 517public void DrawImage(System.Drawing.Image image, float x, float y, System.Drawing.RectangleF srcRect, System.Drawing.GraphicsUnit srcUnit) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 518public void DrawImage(System.Drawing.Image image, float x, float y, float width, float height) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 519public void DrawImageUnscaled(System.Drawing.Image image, System.Drawing.Point point) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 520public void DrawImageUnscaled(System.Drawing.Image image, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 521public void DrawImageUnscaled(System.Drawing.Image image, int x, int y) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 522public void DrawImageUnscaled(System.Drawing.Image image, int x, int y, int width, int height) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 523public void DrawImageUnscaledAndClipped(System.Drawing.Image image, System.Drawing.Rectangle rect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 625public static System.Drawing.Graphics FromImage(System.Drawing.Image image) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 778public static System.Drawing.Image FromFile(string filename) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 779public static System.Drawing.Image FromFile(string filename, bool useEmbeddedColorManagement) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 782public static System.Drawing.Image FromStream(System.IO.Stream stream) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 783public static System.Drawing.Image FromStream(System.IO.Stream stream, bool useEmbeddedColorManagement) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 784public static System.Drawing.Image FromStream(System.IO.Stream stream, bool useEmbeddedColorManagement, bool validateImageData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 790public System.Drawing.Image GetThumbnailImage(int thumbWidth, int thumbHeight, System.Drawing.Image.GetThumbnailImageAbort? callback, System.IntPtr callbackData) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 801public void SaveAdd(System.Drawing.Image image, System.Drawing.Imaging.EncoderParameters? encoderParams) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 812public static void Animate(System.Drawing.Image image, System.EventHandler onFrameChangedHandler) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 813public static bool CanAnimate([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] System.Drawing.Image? image) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 814public static void StopAnimate(System.Drawing.Image image, System.EventHandler onFrameChangedHandler) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 816public static void UpdateFrames(System.Drawing.Image? image) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1332public TextureBrush(System.Drawing.Image bitmap) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1333public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1334public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode, System.Drawing.Rectangle dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1335public TextureBrush(System.Drawing.Image image, System.Drawing.Drawing2D.WrapMode wrapMode, System.Drawing.RectangleF dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1336public TextureBrush(System.Drawing.Image image, System.Drawing.Rectangle dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1337public TextureBrush(System.Drawing.Image image, System.Drawing.Rectangle dstRect, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1338public TextureBrush(System.Drawing.Image image, System.Drawing.RectangleF dstRect) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1339public TextureBrush(System.Drawing.Image image, System.Drawing.RectangleF dstRect, System.Drawing.Imaging.ImageAttributes? imageAttr) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1340public System.Drawing.Image Image { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 1364public System.Drawing.Image? GetImage(object? component) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1365public System.Drawing.Image? GetImage(object? component, bool large) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1366public System.Drawing.Image? GetImage(System.Type type) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1367public System.Drawing.Image? GetImage(System.Type type, bool large) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1368public System.Drawing.Image? GetImage(System.Type type, string? imgName, bool large) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 1369public static System.Drawing.Image? GetImageFromResource(System.Type t, string? imageName, bool large) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2926public PreviewPageInfo(System.Drawing.Image image, System.Drawing.Size physicalSize) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } 2927public System.Drawing.Image Image { get { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); } } 3042public bool IsDirectPrintingSupported(System.Drawing.Image image) { throw new System.PlatformNotSupportedException(System.SR.SystemDrawingCommon_PlatformNotSupported); }
System.Drawing.Common.Tests (99)
mono\System.Drawing.Imaging\IconCodecTests.cs (4)
42using Image image = Image.FromFile(sInFile); 59using Image image = Image.FromFile(sInFile);
mono\System.Drawing\BitmapTests.cs (9)
151bool alpha = Image.IsAlphaPixelFormat(format); 152int size = Image.GetPixelFormatSize(format) / 8 * 2; 508int bbps = Image.GetPixelFormatSize(fmt); 1275using Image image = Image.FromHbitmap(hbitmap); 1301using (Image image = Image.FromHbitmap(hbitmap)) 1311using Image image2 = Image.FromHbitmap(hbitmap);
mono\System.Drawing\GraphicsTests.cs (2)
346using Image img = Image.FromFile(sInFile);
System\Drawing\BitmapTests.cs (17)
314Assert.Throws<NullReferenceException>(() => new Bitmap((Image)null)); 319public void Ctor_Image_Width_Height(Image image, int width, int height) 330public void Ctor_Size(Image image, int width, int height) 384if (Image.IsAlphaPixelFormat(targetFormat)) 603using Bitmap result = Image.FromHbitmap(handle); 615using (Bitmap result = Image.FromHbitmap(handle)) 624using (Bitmap result = Image.FromHbitmap(handle)) 655Assert.Throws<ExternalException>(() => Image.FromHbitmap(IntPtr.Zero)); 656Assert.Throws<ExternalException>(() => Image.FromHbitmap(10)); 741using Image bitmapFromWmf = Image.FromStream(wmfStream); 745using Image expectedPngBitmap = Image.FromStream(expectedPngStream); 748using Image outputPngBitmap = Image.FromStream(outputPngStream); 1285bool alpha = Image.IsAlphaPixelFormat(format); 1286int size = Image.GetPixelFormatSize(format) / 8 * 2;
System\Drawing\IconConverterTests.cs (4)
73Assert.True(_icoConv.CanConvertTo(typeof(Image)), "Image (no context)"); 74Assert.True(_icoConv.CanConvertTo(null, typeof(Image)), "Image"); 91Assert.True(_icoConvFrmTD.CanConvertTo(typeof(Image)), "TD Image (no context)"); 92Assert.True(_icoConvFrmTD.CanConvertTo(null, typeof(Image)), "TD Image");
System\Drawing\ImageConverterTests.cs (6)
11private readonly Image _image; 19_image = Image.FromFile(Path.Combine("bitmaps", "TestImage.bmp")); 125Image newImage = (Image)_imgConv.ConvertFrom(null, CultureInfo.InvariantCulture, _imageBytes); 130newImage = (Image)_imgConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, _imageBytes); 242propsColl = TypeDescriptor.GetProperties(typeof(Image));
System\Drawing\ImageTests.cs (20)
496Assert.Throws<OutOfMemoryException>(() => Image.FromFile(file.Path)); 497Assert.Throws<OutOfMemoryException>(() => Image.FromFile(file.Path, useEmbeddedColorManagement: true)); 503AssertExtensions.Throws<ArgumentNullException>("path", () => Image.FromFile(null)); 504AssertExtensions.Throws<ArgumentNullException>("path", () => Image.FromFile(null, useEmbeddedColorManagement: true)); 510AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty)); 511AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty, useEmbeddedColorManagement: true)); 522Assert.Throws<PathTooLongException>(() => Image.FromFile(fileName)); 523Assert.Throws<PathTooLongException>(() => Image.FromFile(fileName, 530Assert.Throws<FileNotFoundException>(() => Image.FromFile(fileName)); 531Assert.Throws<FileNotFoundException>(() => Image.FromFile(fileName, 539Assert.Throws<FileNotFoundException>(() => Image.FromFile("NoSuchFile")); 540Assert.Throws<FileNotFoundException>(() => Image.FromFile("NoSuchFile", useEmbeddedColorManagement: true)); 551AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream)); 554AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true)); 555AssertExtensions.Throws<ArgumentException>(null, () => Image.FromStream(stream, useEmbeddedColorManagement: true, validateImageData: true)); 562AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null)); 563AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true)); 564AssertExtensions.Throws<ArgumentNullException, ArgumentException>("stream", null, () => Image.FromStream(null, useEmbeddedColorManagement: true, validateImageData: true)); 584Assert.Equal(expectedSize, Image.GetPixelFormatSize(format)); 604Assert.Equal(expected, Image.IsAlphaPixelFormat(format));
System\Drawing\Imaging\ImageFormatTests.cs (2)
110var img = Image.FromFile(path);
System\Drawing\Imaging\PropertyItemTests.cs (2)
75using Image clone = (Image)image.Clone();
System\Drawing\TextureBrushTests.cs (22)
19public void Ctor_Bitmap(Image bitmap, PixelFormat expectedPixelFormat, Size expectedSize) 50yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Clamp, data[1], data[2] }; 51yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Tile, data[1], data[2] }; 52yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipX, data[1], data[2] }; 53yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipXY, data[1], data[2] }; 54yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipY, data[1], data[2] }; 60public void Ctor_Image_WrapMode(Image image, WrapMode wrapMode, PixelFormat expectedPixelFormat, Size expectedSize) 87public void Ctor_Image_Rectangle(Image image, Rectangle rectangle) 108public void Ctor_Image_RectangleF(Image image, Rectangle rectangle) 131yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Clamp, data[1] }; 132yield return new object[] { ((Image)data[0]).Clone(), WrapMode.Tile, data[1] }; 133yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipX, data[1] }; 134yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipXY, data[1] }; 135yield return new object[] { ((Image)data[0]).Clone(), WrapMode.TileFlipY, data[1] }; 141public void Ctor_Image_WrapMode_Rectangle(Image image, WrapMode wrapMode, Rectangle rectangle) 162public void Ctor_Image_WrapMode_RectangleF(Image image, WrapMode wrapMode, Rectangle rectangle) 185yield return new object[] { ((Image)data[0]).Clone(), data[1], null, WrapMode.Tile }; 186yield return new object[] { ((Image)data[0]).Clone(), data[1], new ImageAttributes(), WrapMode.Clamp }; 190yield return new object[] { ((Image)data[0]).Clone(), data[1], customWrapMode, WrapMode.TileFlipXY }; 196public void Ctor_Image_Rectangle_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes, WrapMode expectedWrapMode) 218public void Ctor_Image_RectangleF_ImageAttributes(Image image, Rectangle rectangle, ImageAttributes attributes, WrapMode expectedWrapMode) 241AssertExtensions.Throws<ArgumentNullException>("image", () => new TextureBrush((Image)null));
System\Drawing\ToolboxBitmapAttributeTests.cs (11)
18private static void AssertDefaultSize(Image image) 37using Image image = attribute.GetImage(null); 56using Image image = attribute.GetImage(type); 83using Image image = attribute.GetImage(type, fileName, false); 100using (Image image = attribute.GetImage(typeof(ToolboxBitmapAttributeTests), fileName, large: true)) 105using (Image image = attribute.GetImage(typeof(ToolboxBitmapAttributeTests), fileName, large: false)) 124using Image smallImage = attribute.GetImage(new bitmap_173x183_indexed_8bit(), large: false); 127using Image largeImage = attribute.GetImage(new bitmap_173x183_indexed_8bit(), large: true); 136using (Image image = attribute.GetImage(typeof(ToolboxBitmapAttributeTests), "bitmap_173x183_indexed_8bit", large: true)) 141using (Image image = attribute.GetImage(typeof(ToolboxBitmapAttributeTests), "bitmap_173x183_indexed_8bit", large: false)) 152using Image image = attribute.GetImage(type);
System.Windows.Forms (237)
System\Drawing\Design\PropertyValueUIItem.cs (3)
12/// <param name="uiItemImage"><see cref="Drawing.Image"/> representing the 8 x 8 icon to display.</param> 15public PropertyValueUIItem(Image uiItemImage, PropertyValueUIItemInvokeHandler handler, string? tooltip) 23public virtual Image Image { get; }
System\Drawing\Design\UITypeEditor.cs (1)
58[typeof(Image)] = $"System.Drawing.Design.ImageEditor, {AssemblyRef.SystemDrawingDesign}",
System\Windows\Forms\ActiveX\AxHost.cs (5)
263public override Image? BackgroundImage 3529protected static object? GetIPictureFromPicture(Image? image) 3543protected static object? GetIPictureDispFromPicture(Image? image) 3550protected static Image? GetPictureFromIPicture(object? picture) 3574protected static unsafe Image? GetPictureFromIPictureDisp(object? picture)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (1)
70_lastManaged = Image.FromHbitmap(extendedHandle);
System\Windows\Forms\Control.cs (2)
838public virtual Image? BackgroundImage 840get => Properties.GetValueOrDefault<Image>(s_backgroundImageProperty);
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (3)
27private Image? _image; 372public Image? Image 525/// Gets or sets the <see cref="Forms.ImageList"/> that contains the <see cref="Drawing.Image"/>
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
374internal virtual void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout)
System\Windows\Forms\Controls\Buttons\ButtonRenderer.cs (10)
65/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 124/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 128/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 141/// <inheritdoc cref="DrawButton(Graphics, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, PushButtonState)"/> 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)"/> 203Image image, 226Image image, 238Image image,
System\Windows\Forms\Controls\Buttons\CheckBoxRenderer.cs (6)
49/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 83/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 101/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 155/// <inheritdoc cref="DrawCheckBox(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, CheckBoxState)"/> 162Image image, 187Image image,
System\Windows\Forms\Controls\Buttons\RadioButtonRenderer.cs (7)
49/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 87/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 102/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 155/// <inheritdoc cref="DrawRadioButton(Graphics, Point, Rectangle, string?, Font?, TextFormatFlags, Image, Rectangle, bool, RadioButtonState)" /> 162Image image, 187Image image, 210Image image,
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
264public override Image? BackgroundImage
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (1)
1038public override Image? BackgroundImage
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (3)
912TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image)); 917else if (typeof(Image).IsAssignableFrom(type) || imageTypeConverter.CanConvertFrom(type)) 943TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image));
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (7)
15private static readonly Type s_defaultTypeImage = typeof(Image); 386if (formattedValue is not Image img) 414Image? img = formattedValue as Image; 548Image? image = owningImageColumn.Image; 782Image? image = formattedValue as Image;
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (2)
14private Image? _image; 121public Image? Image
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
144public override Image? BackgroundImage
System\Windows\Forms\Controls\ImageList\ImageList.cs (5)
300bitmap = new Bitmap((Image)original._image); 551Debug.Assert(Image.GetPixelFormatSize(sourceData.PixelFormat) == 32); 552Debug.Assert(Image.GetPixelFormatSize(sourceData.PixelFormat) == Image.GetPixelFormatSize(targetData.PixelFormat)); 623tmpBitmap = Image.FromHbitmap((IntPtr)imageInfo.hbmImage);
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (18)
125public Image this[int index] 191if (value is not Image image) 203public Image? this[string key] 227public void Add(string key, Image image) 262if (value is not Image image) 282public void Add(Image value) 295public int Add(Image value, Color transparentColor) 371public void AddRange(params Image[] images) 376foreach (Image image in images) 389public int AddStrip(Image value) 430public bool Contains(Image image) => throw new NotSupportedException(); 434if (value is not Image image) 448public int IndexOf(Image image) => throw new NotSupportedException(); 452if (value is not Image image) 520Image[] images = new Image[Count]; 530public void Remove(Image image) => throw new NotSupportedException(); 534if (value is Image image)
System\Windows\Forms\Controls\ImageList\ImageList.Original.cs (1)
32if (image is not Icon and not Image)
System\Windows\Forms\Controls\Labels\Label.cs (11)
172public override Image? BackgroundImage 368public Image? Image 372Image? image = Properties.GetValueOrDefault<Image>(s_propImage); 856if (animate == currentlyAnimating || !Properties.TryGetValue(s_propImage, out Image? image)) 873protected Rectangle CalcImageRenderBounds(Image image, Rectangle r, ContentAlignment align) 966private void DrawImage(PaintEventArgs e, Image image, Rectangle r, ContentAlignment align) 980/// Draws an <see cref="Drawing.Image"/> within the specified bounds. 982protected void DrawImage(Graphics g, Image image, Rectangle r, ContentAlignment align) 985private void DrawImageInternal(Graphics g, Image image, Rectangle r, ContentAlignment align) 1255Image? i = Image;
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
171public override Image? BackgroundImage
System\Windows\Forms\Controls\Menus\MenuStrip.cs (1)
142protected internal override ToolStripItem CreateDefaultItem(string? text, Image? image, EventHandler? onClick)
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (1)
213public override Image? BackgroundImage
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (17)
40private Image? _image; 56private Image? _initialImage; 57private Image? _errorImage; 70private Image? _defaultInitialImage; 71private Image? _defaultErrorImage; 74private static Image? t_defaultInitialImageForThread; 77private static Image? t_defaultErrorImageForThread; 229public Image? ErrorImage 302public Image? Image 388public Image? InitialImage 420private void InstallNewImage(Image? value, ImageInstallationType installationType) 478Image img = Image.FromStream(_localImageStreamReader.BaseStream); 487Image img = Image.FromStream(_uriImageStream); 616Image? img = ErrorImage; 623img = Image.FromStream(_tempDownloadStream!);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (1)
102public override Image? BackgroundImage
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
326public override Image? BackgroundImage
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (2)
87internal override void DrawImageCore(Graphics graphics, Image image, Rectangle imageBounds, Point imageStart, LayoutData layout) 93using Image invertedImage = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, Control.BackColor);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1722using Bitmap bitmap = Image.FromHbitmap(compatibleBitmap);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
180public override Image? BackgroundImage
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
126public override Image? BackgroundImage
System\Windows\Forms\Controls\TabControl\TabControl.cs (1)
194public override Image? BackgroundImage
System\Windows\Forms\Controls\TabControl\TabRenderer.cs (3)
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)
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
304public override Image? BackgroundImage
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (1)
247protected internal override ToolStripItem CreateDefaultItem(string? text, Image? image, EventHandler? onClick)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
945/// Gets or sets the <see cref="Forms.ImageList"/> that contains the <see cref="Image"/> displayed on a label control. 1778protected internal virtual ToolStripItem CreateDefaultItem(string? text, Image? image, EventHandler? onClick) => 2587/// Gets or sets the <see cref="Forms.ImageList"/> that contains the <see cref="Image"/> displayed on a label control
System\Windows\Forms\Controls\ToolStrips\ToolStripButton.cs (4)
32public ToolStripButton(Image? image) 38public ToolStripButton(string? text, Image? image) 44public ToolStripButton(string? text, Image? image, EventHandler? onClick) 50public ToolStripButton(string? text, Image? image, EventHandler? onClick, string? name)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
86public override Image? BackgroundImage
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.cs (1)
105public new Image? BackgroundImage
System\Windows\Forms\Controls\ToolStrips\ToolStripControlHost.cs (2)
69public override Image? BackgroundImage 232public override Image? Image
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (5)
34public ToolStripDropDownButton(Image? image) 40public ToolStripDropDownButton(string? text, Image? image) 46public ToolStripDropDownButton(string? text, Image? image, EventHandler? onClick) 52public ToolStripDropDownButton(string? text, Image? image, EventHandler? onClick, string? name) 58public ToolStripDropDownButton(string? text, Image? image, params ToolStripItem[]? dropDownItems)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (3)
35protected ToolStripDropDownItem(string? text, Image? image, EventHandler? onClick) 40protected ToolStripDropDownItem(string? text, Image? image, EventHandler? onClick, string? name) 45protected ToolStripDropDownItem(string? text, Image? image, params ToolStripItem[]? dropDownItems)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
512protected internal override ToolStripItem CreateDefaultItem(string? text, Image? image, EventHandler? onClick)
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (2)
112if (Image.GetPixelFormatSize(image.PixelFormat) > 16) 392if (Image.GetPixelFormatSize(image.PixelFormat) > 16)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (15)
161protected ToolStripItem(string? text, Image? image, EventHandler? onClick) 166protected ToolStripItem(string? text, Image? image, EventHandler? onClick, string? name) 388public virtual Image? BackgroundImage 390get => Properties.GetValueOrDefault<Image>(s_backgroundImageProperty); 1021public virtual Image? Image 1025Image? image = Properties.GetValueOrDefault<Image>(s_imageProperty); 1556Image? image = Properties.GetValueOrDefault<Image>(s_imageProperty); 1713internal Image? MirroredImage 1719Image? image = Image; 1725Image mirroredImage = (Image)image.Clone(); 1733return Properties.GetValueOrDefault<Image>(s_mirroredImageProperty); 2043Image? image = Image;
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (3)
83public ToolStripItem Add(Image? image) 88public ToolStripItem Add(string? text, Image? image) 93public ToolStripItem Add(string? text, Image? image, EventHandler? onClick)
System\Windows\Forms\Controls\ToolStrips\ToolStripItemImageRenderEventArgs.cs (2)
24Image? image, 35public Image? Image { get; }
System\Windows\Forms\Controls\ToolStrips\ToolStripLabel.cs (5)
39public ToolStripLabel(Image? image) 44public ToolStripLabel(string? text, Image? image) 49public ToolStripLabel(string? text, Image? image, bool isLink) 54public ToolStripLabel(string? text, Image? image, bool isLink, EventHandler? onClick) 59public ToolStripLabel(string? text, Image? image, bool isLink, EventHandler? onClick, string? name)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (10)
42private static Image? t_indeterminateCheckedImage; 45private static Image? t_checkedImage; 71public ToolStripMenuItem(Image? image) 77public ToolStripMenuItem(string? text, Image? image) 83public ToolStripMenuItem(string? text, Image? image, EventHandler? onClick) 89public ToolStripMenuItem(string? text, Image? image, EventHandler? onClick, string? name) 95public ToolStripMenuItem(string? text, Image? image, params ToolStripItem[]? dropDownItems) 101public ToolStripMenuItem(string? text, Image? image, EventHandler? onClick, Keys shortcutKeys) 270internal Image? CheckedImage => CheckState switch 674return Image.FromHbitmap(info.hbmpItem);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemInternalLayout.cs (1)
125Image? image = _ownerItem.Image ?? _ownerItem.CheckedImage;
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
744Image? image = e.Image;
System\Windows\Forms\Controls\ToolStrips\ToolStripProgressBar.cs (1)
52public override Image? BackgroundImage
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (6)
314public static Image CreateDisabledImage(Image normalImage) 779Image? image = e.Image; 822Image? image = e.Image; 839Image invertedImage = ControlPaint.CreateBitmapWithInvertedForeColor(bitmap, e.Item.BackColor); 1026private static Bitmap CreateDisabledImage(Image normalImage, ImageAttributes? imgAttrib)
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (2)
50private static Image DownImage => t_downScrollImage ??= ScaleHelper.GetIconResourceAsBestMatchBitmap( 57private static Image UpImage => t_upScrollImage ??= ScaleHelper.GetIconResourceAsBestMatchBitmap(
System\Windows\Forms\Controls\ToolStrips\ToolStripSeparator.cs (2)
33public override Image? BackgroundImage 123public override Image? Image
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (5)
45public ToolStripSplitButton(Image? image) 51public ToolStripSplitButton(string? text, Image? image) 57public ToolStripSplitButton(string? text, Image? image, EventHandler? onClick) 63public ToolStripSplitButton(string? text, Image? image, EventHandler? onClick, string? name) 69public ToolStripSplitButton(string? text, Image? image, params ToolStripItem[]? dropDownItems)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonButton.cs (1)
71public override Image? Image
System\Windows\Forms\Controls\ToolStrips\ToolStripStatusLabel.cs (4)
34public ToolStripStatusLabel(Image? image) 39public ToolStripStatusLabel(string? text, Image? image) 44public ToolStripStatusLabel(string? text, Image? image, EventHandler? onClick) 49public ToolStripStatusLabel(string? text, Image? image, EventHandler? onClick, string? name)
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
56public override Image? BackgroundImage
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
117public override Image? BackgroundImage
System\Windows\Forms\Controls\TreeView\TreeView.cs (5)
216public override Image? BackgroundImage 1771Image[] images = new Image[_stateImageList.Images.Count + 1]; 1983Image[] images = new Image[_stateImageList.Images.Count + 1];
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (1)
146public override Image? BackgroundImage
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
1297public override Image? BackgroundImage
System\Windows\Forms\Layout\Containers\SplitContainer.cs (1)
197public override Image? BackgroundImage
System\Windows\Forms\MDI\MDIClient.cs (3)
47public override Image? BackgroundImage 51Image? result = base.BackgroundImage; 68Image? backgroundImage = BackgroundImage;
System\Windows\Forms\OLE\Clipboard.cs (4)
253public static Image? GetImage() => GetData(DataFormats.Bitmap, autoConvert: true) as Image; 322/// Clears the Clipboard and then adds an <see cref="Image"/> in the <see cref="DataFormats.Bitmap"/> format. 324public static void SetImage(Image image) =>
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (5)
347private static Image? TryGetBitmapData(Com.IDataObject* dataObject, string format) 374Image? data = null; 382&& Image.FromHbitmap(medium.hGlobal) is Image clipboardImage) 384data = (Image)clipboardImage.Clone();
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (1)
312DataFormats.DibConstant when data is Image
System\Windows\Forms\OLE\DataObject.cs (3)
151public virtual Image? GetImage() => GetData(DataFormats.Bitmap, autoConvert: true) as Image; 174public virtual void SetImage(Image image) => SetData(DataFormats.BitmapConstant, true, image.OrThrowIfNull());
System\Windows\Forms\Printing\PrintPreviewDialog.cs (1)
451public override Image? BackgroundImage
System\Windows\Forms\Rendering\ControlPaint.cs (6)
416Image backgroundImage, 1557Image image, 1575internal static bool IsImageTransparent(Image? backgroundImage) 1580internal static void DrawImageReplaceColor(Graphics g, Image image, Rectangle dest, Color oldColor, Color newColor) 1593public static void DrawImageDisabled(Graphics graphics, Image image, int x, int y, Color background) 1600internal static void DrawImageDisabled(Graphics graphics, Image image, Rectangle imageBounds, bool unscaledImage)
System\Windows\Forms\Scrolling\ScrollBar.cs (1)
92public override Image? BackgroundImage
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (1)
299public void DrawImage(Graphics g, Rectangle bounds, Image image)
System.Windows.Forms.Design (46)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
20private Image? _swatch;
System\Drawing\Design\BitmapEditor.cs (1)
19protected override Image LoadFromStream(Stream stream) => new Bitmap(stream);
System\Drawing\Design\ImageEditor.cs (3)
160protected virtual Image LoadFromStream(Stream stream) 168return Image.FromStream(memoryStream); 174if (e?.Value is Image image)
System\Drawing\Design\MetafileEditor.cs (1)
18protected override Image LoadFromStream(Stream stream) => new Metafile(stream);
System\Windows\Forms\Design\BaseContextMenuStrip.cs (2)
262private Image? _image; 287public override Image? Image
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (3)
99private Image GlyphImageClosed => _glyphImageClosed ??= ScaleHelper.GetIconResourceAsBitmap( 104private Image GlyphImageOpened => _glyphImageOpened ??= ScaleHelper.GetIconResourceAsBitmap( 188Image image;
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (3)
63private readonly Image? _backgroundImage; // instead of calling .invalidate on the windows below us, 124Image? backgroundImage, 143Image? backgroundImage,
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
54private Image _dragImage; // A single image of the controls we are actually dragging around
System\Windows\Forms\Design\ComponentTray.cs (1)
1899private Image _toolboxBitmap; // the bitmap used to represent the component
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (3)
733TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image)); 823TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image)); 830else if (typeof(Image).IsAssignableFrom(type) || imageTypeConverter.CanConvertFrom(type))
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
1208public Image? ToolboxBitmap { get; }
System\Windows\Forms\Design\DataGridViewDesigner.cs (4)
434TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image)); 495TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image)); 626TypeConverter imageTypeConverter = TypeDescriptor.GetConverter(typeof(Image)); 647else if (typeof(Image).IsAssignableFrom(propType) || imageTypeConverter.CanConvertFrom(propType))
System\Windows\Forms\Design\DesignBindingPicker.cs (5)
1928foreach (Image image in imageList.Images) 1947foreach (Image image in imageList.Images) 2252public Image CustomBindingImage 2524public ProjectGroupNode(DesignBindingPicker picker, string nodeName, Image image) : base(picker, nodeName, BindingImage.Project) 2547public ProjectDataSourceNode(DesignBindingPicker picker, object dataSource, string nodeName, Image image) : base(picker, dataSource, nodeName)
System\Windows\Forms\Design\DesignerUtils.cs (1)
114public static Image BoxImage
System\Windows\Forms\Design\ImageCollectionEditor.cs (1)
119if (value[i] is Image image)
System\Windows\Forms\Design\ImageIndexEditor.cs (3)
27ImageEditor = TypeDescriptorHelper.GetEditor<UITypeEditor>(typeof(Image)); 37protected virtual Image? GetImage(ITypeDescriptorContext context, int index, string? key, bool useIntIndex) 120Image? image = null;
System\Windows\Forms\Design\ImageListImage.cs (4)
16public ImageListImage(Image image) 21public ImageListImage(Image image, string? name) 35public Image Image { get; set; } 57return new ImageListImage((Bitmap)Image.FromStream(stream));
System\Windows\Forms\Design\ItemTypeToolStripMenuItem.cs (2)
17private Image? _image; 32public override Image? Image
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (2)
15private Image? _image; 74public override Image? Image
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
85Image image = null;
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
607Image image = null;
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (1)
530Image image = null;
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
815Image image = null;
System.Windows.Forms.Design.Tests (7)
EnsureEditorsTests.cs (1)
52[InlineData(typeof(Image), typeof(ImageEditor))]
System\Drawing\Design\BitmapEditorTests.cs (1)
111public new Image LoadFromStream(Stream stream) => base.LoadFromStream(stream);
System\Drawing\Design\ImageEditorTests.cs (1)
216public new Image LoadFromStream(Stream stream) => base.LoadFromStream(stream);
System\Drawing\Design\MetafileEditorTests.cs (1)
85public new Image LoadFromStream(Stream stream) => base.LoadFromStream(stream);
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (2)
317using Bitmap expected = (Bitmap)Image.FromFile(@"Resources\Image1.png"); 373using Bitmap expected = (Bitmap)Image.FromFile(@"Resources\Image1.png");
System\Windows\Forms\Design\ImageListDesignerOriginalImageCollectionTests.cs (1)
16private readonly Image _image = new Bitmap(10, 10);
System.Windows.Forms.Primitives (8)
System\Drawing\ImageExtensions.cs (8)
14/// Convert the given <paramref name="handle"/> to an <see cref="Image"/> of the given <paramref name="type"/>. 17public static Image? OleHandleToImage( 27return (Image)(Icon.FromHandle((HICON)handle).Clone()); 37return (Image)metafile.Clone(); 43return (Image)metafile.Clone(); 47return Image.FromHbitmap((HBITMAP)handle, (HPALETTE)paletteHandle); 59public static Image? ToImage(IPictureDisp* picture) 85public static Image? ToImage(IPicture* picture)
System.Windows.Forms.Primitives.Tests (2)
Interop\Ole32\IPictureTests.cs (2)
75using Image? image = ImageExtensions.ToImage(picture); 86using Image? image = ImageExtensions.ToImage(picture);
System.Windows.Forms.Tests (371)
System\Drawing\Design\PropertyValueUIItemTests.cs (1)
20public void PropertyValueUIItem_Ctor_Image_PropertyValueUIItemInvokeHandler_String(Image uiItemImage, PropertyValueUIItemInvokeHandler handler, string tooltip)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemDetailsAccessibleObjectTests.cs (1)
188using Image image = new Bitmap(1, 1);
System\Windows\Forms\AxHostTests.cs (5)
305public void AxHost_BackgroundImage_Set_GetReturnsExpected(Image value) 3234public static new object GetIPictureDispFromPicture(Image image) => AxHost.GetIPictureDispFromPicture(image); 3236public static new object GetIPictureFromPicture(Image image) => AxHost.GetIPictureFromPicture(image); 3238public static new Image GetPictureFromIPicture(object picture) => AxHost.GetPictureFromIPicture(picture); 3240public static new Image GetPictureFromIPictureDisp(object picture) => AxHost.GetPictureFromIPictureDisp(picture);
System\Windows\Forms\ButtonBaseTests.cs (53)
815foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 825public void ButtonBase_Enabled_Set_GetReturnsExpected(bool visible, Image image, bool value) 849public void ButtonBase_Enabled_SetDesignMode_GetReturnsExpected(bool visible, Image image, bool value) 889foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 899public void ButtonBase_Enabled_SetWithHandle_GetReturnsExpected(bool visible, Image image, bool value, int expectedInvalidatedCallCount1, int expectedInvalidatedCallCount2) 940public void ButtonBase_Enabled_SetDesignModeWithHandle_GetReturnsExpected(bool visible, Image image, bool value, int expectedInvalidatedCallCount1, int expectedInvalidatedCallCount2) 1393public void ButtonBase_Image_Set_GetReturnsExpected(bool autoSize, bool enabled, bool visible, Image value) 1493public void ButtonBase_Image_SetDesignMode_GetReturnsExpected(bool autoSize, bool enabled, bool visible, Image value) 1546public void ButtonBase_Image_SetWithParent_GetReturnsExpected(bool autoSize, bool enabled, bool visible, Image value, int expectedParentLayoutCallCount) 1609public void ButtonBase_Image_SetWithHandle_GetReturnsExpected(bool autoSize, bool enabled, bool visible, Image value, int expectedInvalidatedCallCount) 1647public void ButtonBase_Image_SetDesignModeWithHandle_GetReturnsExpected(bool autoSize, bool enabled, bool visible, Image value, int expectedInvalidatedCallCount) 1713public void ButtonBase_Image_SetWithParentWithHandle_GetReturnsExpected(bool autoSize, bool enabled, bool visible, Image value, int expectedParentLayoutCallCount, int expectedInvalidatedCallCount) 2798foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 2809public void ButtonBase_Parent_Set_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2829public void ButtonBase_Parent_SetDesignMode_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2863public void ButtonBase_Parent_SetWithNonNullOldParent_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2907public void ButtonBase_Parent_SetWithHandle_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 2941public void ButtonBase_Parent_SetDesignModeWithHandle_GetReturnsExpected(bool enabled, bool visible, Image image, Control value) 4342foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 4352public void ButtonBase_Visible_Set_GetReturnsExpected(bool enabled, Image image, bool value) 4376public void ButtonBase_Visible_SetDesignMode_GetReturnsExpected(bool enabled, Image image, bool value) 4416foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 4426public void ButtonBase_Visible_SetWithHandle_GetReturnsExpected(bool enabled, Image image, bool value) 4467public void ButtonBase_Visible_SetDesignModeWithHandle_GetReturnsExpected(bool enabled, Image image, bool value) 5103foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 5114public void ButtonBase_OnEnabledChanged_Invoke_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 5145public void ButtonBase_OnEnabledChanged_InvokeDesignMode_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 5194foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 5205public void ButtonBase_OnEnabledChanged_InvokeWithHandle_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs, int expectedInvalidatedCallCount) 5249public void ButtonBase_OnEnabledChanged_InvokeDesignModeWithHandle_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs, int expectedInvalidatedCallCount) 6932foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 6943public void ButtonBase_OnParentChanged_Invoke_CallsParentChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 6974public void ButtonBase_OnParentChanged_InvokeDesignMode_CallsParentChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 7023foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 7034public void ButtonBase_OnParentChanged_InvokeWithHandle_CallsParentChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 7078public void ButtonBase_OnParentChanged_InvokeDesignModeWithHandle_CallsParentChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 7362foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 7373public void ButtonBase_OnVisibleChanged_Invoke_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 7404public void ButtonBase_OnVisibleChanged_InvokeDesignMode_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 7453foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 7464public void ButtonBase_OnVisibleChanged_InvokeWithHandle_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 7508public void ButtonBase_OnVisibleChanged_InvokeDesignModeWithHandle_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs)
System\Windows\Forms\ClipboardTests.cs (1)
128Image? result = Clipboard.GetImage();
System\Windows\Forms\ComboBoxTests.cs (1)
499public void ComboBox_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\ControlPaintTests.cs (1)
1327public void ControlPaint_DrawImageDisabled_Invoke_Success(Image image, int x, int y, Color background)
System\Windows\Forms\ControlTests.Handlers.cs (12)
3836foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb), new Bitmap(10, 10, PixelFormat.Format32bppArgb) }) 3852public void Control_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 3899foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 3943foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 3974public void Control_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4024public void Control_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 4071foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 4101public void Control_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ControlTests.Properties.cs (5)
1635public void Control_BackgroundImage_Set_GetReturnsExpected(Image value) 1658public void Control_BackgroundImage_SetWithHandle_GetReturnsExpected(Image value, int expectedInvalidatedCallCount) 1687public void Control_BackgroundImage_SetWithChildren_GetReturnsExpected(Image value) 1709public void Control_BackgroundImage_SetWithChildrenWithBackgroundImage_GetReturnsExpected(Image value) 2054public void Control_BackgroundImageLayout_SetWithBackgroundImage_GetReturnsExpected(Image backgroundImage, ImageLayout value, bool expectedDoubleBuffered)
System\Windows\Forms\DataObjectTests.cs (4)
663public static TheoryData<object, Image> GetImage_TheoryData() 665TheoryData<object, Image> theoryData = []; 677public void DataObject_GetImage_InvokeWithData_ReturnsExpected(object result, Image expected) 686public void DataObject_GetImage_InvokeMocked_ReturnsExpected(object result, Image expected)
System\Windows\Forms\ImageList.ImageCollectionTests.cs (21)
257public void ImageCollection_Item_Set_GetReturnsExpected(Color transparentColor, Image value) 278public void ImageCollection_Item_SetWithHandle_GetReturnsExpected(Color transparentColor, Image value) 437public void ImageCollection_Add_InvokeStringImage_Success(Color transparentColor, Image value) 481public void ImageCollection_Add_InvokeStringImageWithHandle_Success(Color transparentColor, Image value) 526public void ImageCollection_Add_InvokeImage_Success(Color transparentColor, Image value) 550public void ImageCollection_Add_InvokeImageWithHandle_Success(Color transparentColor, Image value) 595public void ImageCollection_Add_InvokeImageColor_Success(Color listTransparentColor, Image value, Color transparentColor) 619public void ImageCollection_Add_InvokeImageColorWithHandle_Success(Color listTransparentColor, Image value, Color transparentColor) 793Assert.Throws<ArgumentNullException>("value", () => collection.Add((Image)null)); 795Assert.Throws<InvalidOperationException>(() => collection.Add("Key", (Image)null)); 814public void ImageCollection_AddRange_Invoke_Success(Color transparentColor, Image value) 829collection.AddRange(Array.Empty<Image>()); 838public void ImageCollection_AddRange_InvokeWithHandle_Success(Color transparentColor, Image value) 854collection.AddRange(Array.Empty<Image>()); 903public void ImageCollection_AddStrip_Invoke_Success(Color transparentColor, Image value, int expectedCount) 920public void ImageCollection_AddStrip_InvokeWithHandle_Success(Color transparentColor, Image value, int expectedCount) 1063public void ImageCollection_Contains_ThrowsNotSupportedException(Image image) 1277public void ImageCollection_IndexOf_ThrowsNotSupportedException(Image image) 1293public void ImageCollection_Remove_Invoke_ThrowsNotSupportedException(Image image) 1630public void ImageCollection_IListItem_Set_GetReturnsExpected(Color transparentColor, Image value) 1651public void ImageCollection_IListItem_SetWithHandle_GetReturnsExpected(Color transparentColor, Image value)
System\Windows\Forms\ImageListTests.cs (2)
473Assert.Equal(new Size(32, 32), ((Image)Assert.Single(list.Images)).Size); 482Assert.Equal(new Size(32, 32), ((Image)Assert.Single(list.Images)).Size);
System\Windows\Forms\ListBoxTests.cs (1)
474public void ListBox_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\MdiClientTests.cs (2)
176public void MdiClient_BackgroundImage_GetWithParent_GetReturnsExpected(Image parentBackgroundImage) 196public void MdiClient_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\MdiControlStripTests.cs (1)
430public new ToolStripItem CreateDefaultItem(string text, Image image, EventHandler onClick) => base.CreateDefaultItem(text, image, onClick);
System\Windows\Forms\MenuStripTests.cs (3)
447public void MenuStrip_CreateDefaultItem_InvokeButton_Success(string text, Image image, EventHandler onClick) 465public void MenuStrip_CreateDefaultItem_InvokeSeparator_Success(Image image, EventHandler onClick) 926public new ToolStripItem CreateDefaultItem(string text, Image image, EventHandler onClick) => base.CreateDefaultItem(text, image, onClick);
System\Windows\Forms\MonthCalendarTests.cs (1)
374public void MonthCalendar_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\PictureBoxTests.cs (16)
312public void PictureBox_ErrorImage_Set_GetReturnsExpected(Image value) 329public void PictureBox_ErrorImage_SetWithNonNullOldValue_GetReturnsExpected(Image value) 348public void PictureBox_ErrorImage_SetWithHandle_GetReturnsExpected(Image value) 365public void PictureBox_ErrorImage_SetWithNonNullOldValueWithHandle_GetReturnsExpected(Image value) 530public void PictureBox_Image_Set_GetReturnsExpected(Image value) 545public void PictureBox_Image_SetWithNonNullOldValue_GetReturnsExpected(Image value) 562public void PictureBox_Image_SetWithHandle_GetReturnsExpected(Image value) 577public void PictureBox_Image_SetWithNonNullOldValueWithHandle_GetReturnsExpected(Image value) 816public void PictureBox_ImageLocation_SetInvalidWithWaitOnLoadTrueDesignMode_GetReturnsExpected(Image initialImage, Image errorImage, string value) 1009public void PictureBox_InitialImage_Set_GetReturnsExpected(Image value) 1026public void PictureBox_InitialImage_SetWithNonNullOldValue_GetReturnsExpected(Image value) 1045public void PictureBox_InitialImage_SetWithHandle_GetReturnsExpected(Image value) 1062public void PictureBox_InitialImage_SetWithNonNullOldValueWithHandle_GetReturnsExpected(Image value) 2031public void PictureBox_Load_UrlInvalidWithWaitOnLoadTrueDesignMode_GetReturnsExpected(Image initialImage, Image errorImage, string value)
System\Windows\Forms\ProgressBarTests.cs (1)
217public void ProgressBar_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\PropertyGridTests.cs (1)
409public void PropertyGrid_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\RichTextBoxTests.cs (1)
739public void RichTextBox_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\ScrollableControlTests.cs (12)
1510foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb), new Bitmap(10, 10, PixelFormat.Format32bppArgb) }) 1528public void ScrollableControl_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 1582foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 1626foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 1675public void ScrollableControl_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 1727public void ScrollableControl_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 1782foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 1815public void ScrollableControl_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ScrollBarTests.cs (1)
246public void ScrollBar_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\SplitterTests.cs (1)
200public void Splitter_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\StatusStripTests.cs (2)
882public void StatusStrip_CreateDefaultItem_Invoke_Success(string text, Image image, EventHandler onClick) 1348public new ToolStripItem CreateDefaultItem(string text, Image image, EventHandler onClick) => base.CreateDefaultItem(text, image, onClick);
System\Windows\Forms\TabControlTests.cs (1)
617public void TabControl_BackgroundImage_Set_GetReturnsExpected(Image value)
System\Windows\Forms\TabPageTests.cs (10)
3958foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb), new Bitmap(10, 10, PixelFormat.Format32bppArgb) }) 3974public void TabPage_OnPaintBackground_Invoke_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 4012foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 4044public void TabPage_OnPaintBackground_InvokeWithParent_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 4100public void TabPage_OnPaintBackground_InvokeWithHandle_Success(bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 4151foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 4183public void TabPage_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(TabAppearance appearance, bool useVisualStyleBackColor, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount)
System\Windows\Forms\ToolStripButtonTests.cs (8)
183public void ToolStripButton_Ctor_Image(Image image) 273public void ToolStripButton_Ctor_String_Image(string text, Image image) 363public void ToolStripButton_Ctor_String_Image_EventHandler(string text, Image image, EventHandler onClick) 461public void ToolStripButton_Ctor_String_Image_EventHandler_String(string text, Image image, EventHandler onClick, string name, string expectedName) 1704public SubToolStripButton(Image image) : base(image) 1708public SubToolStripButton(string text, Image image) : base(text, image) 1712public SubToolStripButton(string text, Image image, EventHandler onClick) : base(text, image, onClick) 1716public SubToolStripButton(string text, Image image, EventHandler onClick, string name) : base(text, image, onClick, name)
System\Windows\Forms\ToolStripControlHostTests.cs (28)
400yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 401yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 406public void ToolStripControlHost_BackgroundImage_Set_GetReturnsExpected(Image value) 852foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 862public void ToolStripControlHost_Enabled_Set_GetReturnsExpected(bool visible, Image image, bool value) 1211yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 1212yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 1218public void ToolStripControlHost_Image_Set_GetReturnsExpected(Color imageTransparentColor, Image value) 1337yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), color }; 1338yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color }; 1344public void ToolStripControlHost_ImageTransparentColor_Set_GetReturnsExpected(Image image, Color value) 1368foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 1382public void ToolStripControlHost_Parent_Set_GetReturnsExpected(bool enabled, bool visible, Image image, bool allowDrop) 1449public void ToolStripControlHost_Parent_SetWithOwner_GetReturnsExpected(bool enabled, bool visible, Image image, bool allowDrop) 2394foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 2404public void ToolStripControlHost_Visible_Set_GetReturnsExpected(bool enabled, Image image, bool value) 3039foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 3055public void ToolStripControlHost_OnParentChanged_Invoke_Success(bool enabled, bool visible, Image image, bool allowDrop, ToolStrip oldParent, ToolStrip newParent) 3073public void ToolStripControlHost_OnParentChanged_InvokeWithOwner_Success(bool enabled, bool visible, Image image, bool allowDrop, ToolStrip oldParent, ToolStrip newParent) 3095public void ToolStripControlHost_OnParentChanged_InvokeControlWithoutParent_Success(bool enabled, bool visible, Image image, bool allowDrop) 3164public void ToolStripControlHost_OnParentChanged_InvokeControlWithParent_Success(bool enabled, bool visible, Image image, bool allowDrop) 3242public void ToolStripControlHost_OnParentChanged_InvokeDisposed_Success(bool enabled, bool visible, Image image, bool allowDrop, ToolStrip oldParent, ToolStrip newParent) 3262public void ToolStripControlHost_OnParentChanged_InvokeDisposedWithOwner_Success(bool enabled, bool visible, Image image, bool allowDrop, ToolStrip oldParent, ToolStrip newParent) 4453public void ToolStripControlHost_SetVisibleCore_Invoke_GetReturnsExpected(bool enabled, Image image, bool value)
System\Windows\Forms\ToolStripDropDownItemTests.cs (6)
105public void ToolStripDropDownItem_Ctor_String_Image_EventHandler(string text, Image image, EventHandler onClick) 204public void ToolStripDropDownItem_Ctor_String_Image_EventHandler_String(string text, Image image, EventHandler onClick, string name, string expectedName) 303public void ToolStripDropDownItem_Ctor_String_Image_ToolStripItemArray(string text, Image image, ToolStripItem[] dropDownItems, ToolStripItem[] expectedDropDownItems) 497public SubToolStripDropDownItem(string text, Image image, EventHandler onClick) : base(text, image, onClick) 501public SubToolStripDropDownItem(string text, Image image, EventHandler onClick, string name) : base(text, image, onClick, name) 505public SubToolStripDropDownItem(string text, Image image, params ToolStripItem[] dropDownItems) : base(text, image, dropDownItems)
System\Windows\Forms\ToolStripDropDownTests.cs (4)
794public void ToolStripDropDown_BackgroundImage_Set_GetReturnsExpected(Image value) 2959public void ToolStripDropDown_CreateDefaultItem_InvokeButton_Success(string text, Image image, EventHandler onClick) 2977public void ToolStripDropDown_CreateDefaultItem_InvokeSeparator_Success(Image image, EventHandler onClick) 5170public new ToolStripItem CreateDefaultItem(string text, Image image, EventHandler onClick) => base.CreateDefaultItem(text, image, onClick);
System\Windows\Forms\ToolStripItemImageRenderEventArgsTests.cs (2)
62public void ToolStripItemImageRenderEventArgs_Ctor_Graphics_ToolStripItem_Rectangle(Graphics g, ToolStripItem item, Rectangle imageRectangle, Image expectedImage) 98public void ToolStripItemImageRenderEventArgs_Ctor_ToolStripItem_Image_Rectangle(ToolStripItem item, Image image, Rectangle imageRectangle)
System\Windows\Forms\ToolStripItemTests.cs (115)
104public void ToolStripItem_Ctor_String_Image_EventHandler(string text, Image image, EventHandler onClick) 199public void ToolStripItem_Ctor_String_Image_EventHandler_String(string text, Image image, EventHandler onClick, string name, string expectedName) 1120public void ToolStripItem_Available_Set_GetReturnsExpected(bool enabled, Image image, bool value) 1147public void ToolStripItem_Available_SetDesignMode_GetReturnsExpected(bool enabled, Image image, bool value) 1211public void ToolStripItem_Available_SetWithOwner_GetReturnsExpected(bool enabled, Image image, bool value) 1244public void ToolStripItem_Available_SetDesignModeWithOwner_GetReturnsExpected(bool enabled, Image image, bool value) 1290foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 1300public void ToolStripItem_Available_SetWithOwnerWithHandle_GetReturnsExpected(bool enabled, Image image, bool value, int expectedInvalidatedCallCount) 1349public void ToolStripItem_Available_SetWithParent_GetReturnsExpected(bool enabled, Image image, bool value) 1382public void ToolStripItem_Available_SetDesignModeWithParent_GetReturnsExpected(bool enabled, Image image, bool value) 1426public void ToolStripItem_Available_SetWithParentWithHandle_GetReturnsExpected(bool enabled, Image image, bool value) 1769yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 1770yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 1775public void ToolStripItem_BackgroundImage_Set_GetReturnsExpected(Image value) 1790public void ToolStripItem_BackgroundImage_SetWithOwner_GetReturnsExpected(Image value) 1810public void ToolStripItem_BackgroundImage_SetWithOwnerWithHandle_GetReturnsExpected(Image value) 1843public void ToolStripItem_BackgroundImage_SetWithParent_GetReturnsExpected(Image value) 1865yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), 1 }; 1866yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), 1 }; 1871public void ToolStripItem_BackgroundImage_SetWithParentWithHandle_GetReturnsExpected(Image value, int expectedInvalidatedCallCount) 2510foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 2520public void ToolStripItem_Enabled_Set_GetReturnsExpected(bool visible, Image image, bool value) 2583public void ToolStripItem_Enabled_SetDesignMode_GetReturnsExpected(bool visible, Image image, bool value) 2615public void ToolStripItem_Enabled_SetWithOwner_GetReturnsExpected(bool visible, Image image, bool value) 2642public void ToolStripItem_Enabled_SetWithImageWithOwner_GetReturnsExpected(bool visible, Image image, bool value) 2669public void ToolStripItem_Enabled_SetDesignModeWithOwner_GetReturnsExpected(bool visible, Image image, bool value) 2707public void ToolStripItem_Enabled_SetWithOwnerWithHandle_GetReturnsExpected(bool visible, Image image, bool value) 2750public void ToolStripItem_Enabled_SetWithParent_GetReturnsExpected(bool visible, Image image, bool value) 2777public void ToolStripItem_Enabled_SetWithImageWithParent_GetReturnsExpected(bool visible, Image image, bool value) 2804public void ToolStripItem_Enabled_SetDesignModeWithParent_GetReturnsExpected(bool visible, Image image, bool value) 2844foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 2854public void ToolStripItem_Enabled_SetWithParentWithHandle_GetReturnsExpected(bool visible, Image image, bool value, int expectedInvalidatedCallCount) 3785yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 3786yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 3792public void ToolStripItem_Image_Set_GetReturnsExpected(Color imageTransparentColor, Image value) 3815yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), -1 }; 3816yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), -1 }; 3822public void ToolStripItem_Image_SetWithImageIndex_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedImageIndex) 3842public void ToolStripItem_Image_SetWithNonNullOldValue_GetReturnsExpected(Color imageTransparentColor, Image value) 3863public void ToolStripItem_Image_SetWithNonNullOldValueWithImageIndex_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedImageIndex) 3889yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), 1 }; 3890yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), 1 }; 3896public void ToolStripItem_Image_SetWithOwner_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedOwnerLayoutCallCount) 3941public void ToolStripItem_Image_SetWithOwnerWithHandle_GetReturnsExpected(Color imageTransparentColor, Image value, int expectedOwnerLayoutCallCount) 3999public void ToolStripItem_Image_SetWithParent_GetReturnsExpected(Color imageTransparentColor, Image value) 4034public void ToolStripItem_Image_SetWithParentWithHandle_GetReturnsExpected(Color imageTransparentColor, Image value) 5603yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), color }; 5604yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color }; 5610public void ToolStripItem_ImageTransparentColor_Set_GetReturnsExpected(Image image, Color value) 5627public void ToolStripItem_ImageTransparentColor_SetWithCustomOldValue_GetReturnsExpected(Image image, Color value) 5645public void ToolStripItem_ImageTransparentColor_SetWithOwner_GetReturnsExpected(Image image, Color value) 5670yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 }; 5671yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 }; 5672yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 }; 5673yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 }; 5678public void ToolStripItem_ImageTransparentColor_SetWithOwnerWithHandle_GetReturnsExpected(Image image, Color value, int expectedInvalidatedCallCount) 5712public void ToolStripItem_ImageTransparentColor_SetWithParent_GetReturnsExpected(Image image, Color value) 5737yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 }; 5738yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 }; 5739yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 }; 5740yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 }; 5745public void ToolStripItem_ImageTransparentColor_SetWithParentWithHandle_GetReturnsExpected(Image image, Color value, int expectedParentInvalidatedCallCount) 6947foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 6961public void ToolStripItem_Parent_Set_GetReturnsExpected(bool enabled, bool visible, Image image, bool allowDrop) 7017public void ToolStripItem_Parent_SetWithMargin_GetReturnsExpected(bool enabled, bool visible, Image image, bool allowDrop) 9170public void ToolStripItem_Visible_Set_GetReturnsExpected(bool enabled, Image image, bool value) 9197public void ToolStripItem_Visible_SetDesignMode_GetReturnsExpected(bool enabled, Image image, bool value) 9261public void ToolStripItem_Visible_SetWithOwner_GetReturnsExpected(bool enabled, Image image, bool value) 9294public void ToolStripItem_Visible_SetDesignModeWithOwner_GetReturnsExpected(bool enabled, Image image, bool value) 9340foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 9350public void ToolStripItem_Visible_SetWithOwnerWithHandle_GetReturnsExpected(bool enabled, Image image, bool value, int expectedInvalidatedCallCount) 9399public void ToolStripItem_Visible_SetWithParent_GetReturnsExpected(bool enabled, Image image, bool value) 9432public void ToolStripItem_Visible_SetDesignModeWithParent_GetReturnsExpected(bool enabled, Image image, bool value) 9476public void ToolStripItem_Visible_SetWithParentWithHandle_GetReturnsExpected(bool enabled, Image image, bool value) 11096foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 11107public void ToolStripItem_OnEnabledChanged_Invoke_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 11136public void ToolStripItem_OnEnabledChanged_InvokeDesignMode_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 11165public void ToolStripItem_OnEnabledChanged_InvokeWithOwner_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 11198public void ToolStripItem_OnEnabledChanged_InvokeWithOwnerWithHandle_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 11244public void ToolStripItem_OnEnabledChanged_InvokeWithParent_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 11277public void ToolStripItem_OnEnabledChanged_InvokeWithParentWithHandle_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 12523foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 12539public void ToolStripItem_OnParentChanged_Invoke_Success(bool enabled, bool visible, Image image, bool allowDrop, ToolStrip oldParent, ToolStrip newParent) 12553public void ToolStripItem_OnParentEnabledChanged_Invoke_CallsEnabledChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13189foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 13200public void ToolStripItem_OnVisibleChanged_Invoke_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13229public void ToolStripItem_OnVisibleChanged_InvokeDesignMode_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13258public void ToolStripItem_OnVisibleChanged_InvokeWithOwner_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13302public void ToolStripItem_OnVisibleChanged_InvokeWithOwnerWithHandle_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13368public void ToolStripItem_OnVisibleChanged_InvokeWithDisposingOwner_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13434public void ToolStripItem_OnVisibleChanged_InvokeWithDisposedOwner_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13494public void ToolStripItem_OnVisibleChanged_InvokeWithParent_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 13538public void ToolStripItem_OnVisibleChanged_InvokeWithParentWithHandle_CallsVisibleChanged(bool enabled, bool visible, Image image, EventArgs eventArgs) 14820foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 14830public void ToolStripItem_SetVisibleCore_Invoke_GetReturnsExpected(bool enabled, Image image, bool value) 14858public void ToolStripItem_SetVisibleCore_InvokeDesignMode_GetReturnsExpected(bool enabled, Image image, bool value) 14923public void ToolStripItem_SetVisibleCore_InvokeWithOwner_GetReturnsExpected(bool enabled, Image image, bool value) 14956public void ToolStripItem_SetVisibleCore_InvokeDesignModeWithOwner_GetReturnsExpected(bool enabled, Image image, bool value) 15002foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 15012public void ToolStripItem_SetVisibleCore_InvokeWithOwnerWithHandle_GetReturnsExpected(bool enabled, Image image, bool value, int expectedInvalidatedCallCount) 15061public void ToolStripItem_SetVisibleCore_InvokeWithParent_GetReturnsExpected(bool enabled, Image image, bool value) 15094public void ToolStripItem_SetVisibleCore_InvokeDesignModeWithParent_GetReturnsExpected(bool enabled, Image image, bool value) 15138public void ToolStripItem_SetVisibleCore_InvokeWithParentWithHandle_GetReturnsExpected(bool enabled, Image image, bool value) 15489public SubToolStripItem(string text, Image image, EventHandler onClick) : base(text, image, onClick) 15493public SubToolStripItem(string text, Image image, EventHandler onClick, string name) : base(text, image, onClick, name)
System\Windows\Forms\ToolStripMenuItemTests.cs (3)
413public SubToolStripMenuItem(string text, Image image, EventHandler onClick) : base(text, image, onClick) 417public SubToolStripMenuItem(string text, Image image, EventHandler onClick, string name) : base(text, image, onClick, name) 421public SubToolStripMenuItem(string text, Image image, params ToolStripItem[] dropDownItems) : base(text, image, dropDownItems)
System\Windows\Forms\ToolStripRendererTests.cs (5)
15Image result = Assert.IsType<Bitmap>(ToolStripRenderer.CreateDisabledImage(image)); 204public void ToolStripRenderer_DrawItemCheck_Invoke_CallsRenderItemCheck(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 237public void ToolStripRenderer_DrawItemImage_Invoke_CallsRenderItemImage(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 799public void ToolStripRenderer_OnRenderItemCheck_Invoke_Nop(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle) 819public void ToolStripRenderer_OnRenderItemImage_Invoke_Nop(Graphics graphics, ToolStripItem item, Image image, Rectangle imageRectangle)
System\Windows\Forms\ToolStripSeparatorTests.cs (12)
114yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 115yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 120public void ToolStripSeparator_BackgroundImage_Set_GetReturnsExpected(Image value) 244foreach (Image image in new Image[] { null, new Bitmap(10, 10) }) 254public void ToolStripSeparator_Enabled_Set_GetReturnsExpected(bool visible, Image image, bool value) 421yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 422yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 428public void ToolStripSeparator_Image_Set_GetReturnsExpected(Color imageTransparentColor, Image value) 531yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), color }; 532yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color }; 538public void ToolStripSeparator_ImageTransparentColor_Set_GetReturnsExpected(Image image, Color value)
System\Windows\Forms\ToolStripTests.cs (15)
4277public void ToolStrip_CreateDefaultItem_InvokeButton_Success(string text, Image image, EventHandler onClick) 4295public void ToolStrip_CreateDefaultItem_InvokeSeparator_Success(Image image, EventHandler onClick) 5851foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb), new Bitmap(10, 10, PixelFormat.Format32bppArgb) }) 5869public void ToolStrip_OnPaintBackground_Invoke_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 5924foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 5976foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 6016public void ToolStrip_OnPaintBackground_InvokeWithParent_CallsPaint(Control parent, bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 6067public void ToolStrip_OnPaintBackground_InvokeWithHandle_Success(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout) 6122foreach (Image backgroundImage in new Image[] { null, new Bitmap(10, 10, PixelFormat.Format32bppRgb) }) 6154public void ToolStrip_OnPaintBackground_InvokeWithParentWithHandle_CallsPaint(bool hScroll, bool vScroll, bool supportsTransparentBackColor, Color backColor, Image backgroundImage, ImageLayout backgroundImageLayout, int expectedPaintCallCount) 7604public new ToolStripItem CreateDefaultItem(string text, Image image, EventHandler onClick) => base.CreateDefaultItem(text, image, onClick);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
55using Image image = new Bitmap(width, height);
System\Windows\Forms\TreeViewTests.cs (7)
791public void TreeView_BackgroundImage_Set_GetReturnsExpected(Image value) 6003yield return new object[] { Array.Empty<Image>(), null, false }; 6004yield return new object[] { new Image[] { new Bitmap(10, 10) }, null, true }; 6005yield return new object[] { Array.Empty<Image>(), new EventArgs(), false }; 6006yield return new object[] { new Image[] { new Bitmap(10, 10) }, new EventArgs(), true }; 6011public void TreeView_OnHandleCreated_InvokeWithHandleWithProperties_CallsHandleCreated(Image[] images, EventArgs eventArgs, bool expectedStateImageListHandleCreated) 6081public void TreeView_OnHandleCreated_InvokeWithHandleWithPropertiesDesignMode_CallsHandleCreated(Image[] images, EventArgs eventArgs, bool expectedStateImageListHandleCreated)
System\Windows\Forms\UpDownBaseTests.cs (1)
602public void UpDownBase_BackgroundImage_Set_GetReturnsExpected(Image value)
TextBoxBaseTests.cs (1)
441public void TextBoxBase_BackgroundImage_Set_GetReturnsExpected(Image value)
ToolStripContainerTests.cs (1)
72using Image value = new Bitmap(10, 10);
TrackBarTests.cs (1)
436public void TrackBar_BackgroundImage_Set_GetReturnsExpected(Image value)
System.Windows.Forms.TestUtilities (2)
CommonTestHelperEx.cs (2)
34public static TheoryData<Image> GetImageTheoryData() 36TheoryData<Image> data = new()
System.Windows.Forms.UI.IntegrationTests (2)
PropertyGridTests.cs (1)
181using Image newImage = new Bitmap(100, 100);
ToolStripTests.cs (1)
17_sharedImageList.Images.Add("square", Image.FromFile("./Resources/image.png"));
WindowsFormsIntegration (3)
System\Windows\Integration\Convert.cs (1)
139internal static SWMI.BitmapImage ToSystemWindowsMediaImagingBitmapImage(SD.Image fromImage)
System\Windows\Integration\HostUtils.cs (2)
289SD.Image newImage = null; 297using (newImage = SD.Image.FromStream(memoryStream))
WinFormsControlsTest (17)
CollectionEditors.cs (4)
26imageList.Images.Add("SmallA", Image.FromFile("Images\\SmallA.bmp")); 27imageList.Images.Add(Image.FromFile("Images\\SmallABlue.bmp")); 28imageList.Images.Add("LargeA", Image.FromFile("Images\\LargeA.bmp")); 29imageList.Images.Add(Image.FromFile("Images\\LargeABlue.bmp"));
DataGridViewTest.cs (1)
30column6.Image = Image.FromFile("Images\\SmallA.bmp");
ListViewTest.cs (6)
130imageListSmall.Images.Add(Image.FromFile("Images\\SmallA.bmp")); 131imageListSmall.Images.Add(Image.FromFile("Images\\SmallABlue.bmp")); 132imageListLarge.Images.Add(Image.FromFile("Images\\LargeA.bmp")); 133imageListLarge.Images.Add(Image.FromFile("Images\\LargeABlue.bmp")); 249Bitmap bitmap = (Bitmap)Image.FromFile(file); 280Bitmap bitmap = (Bitmap)Image.FromFile(file);
MultipleControls.cs (4)
92imageListSmall.Images.Add(Image.FromFile("Images\\SmallA.bmp")); 93imageListSmall.Images.Add(Image.FromFile("Images\\SmallABlue.bmp")); 94imageListLarge.Images.Add(Image.FromFile("Images\\LargeA.bmp")); 95imageListLarge.Images.Add(Image.FromFile("Images\\LargeABlue.bmp"));
ToolStripTests.cs (2)
20toolStrip2_Button4.Image = Image.FromFile("Images\\SmallA.bmp"); 22toolStrip2_Button5.Image = Image.FromFile("Images\\SmallABlue.bmp");