67 instantiations of Bitmap
PresentationFramework-SystemDrawing (4)
SystemDrawingExtension.cs (4)
68Bitmap bmp = new Bitmap(bitmapwidth, bitmapheight); 78Bitmap bitmap = new(stream); 110return new Bitmap(bitmapStream); 125Bitmap bitmapFinal = new(imageWidth, imageHeight, PixelFormat.Format32bppRgb);
System.Drawing.Common (16)
misc\DpiHelper.cs (1)
105Bitmap deviceImage = new(deviceImageSize.Width, deviceImageSize.Height, logicalImage.PixelFormat);
System\Drawing\Bitmap.cs (5)
138return new Bitmap(bitmap); 150return new Bitmap(bitmap); 208return new Bitmap(clone); 240using Bitmap result = new(size.Width, size.Height, PixelFormat.Format32bppArgb); 362return new Bitmap(clone);
System\Drawing\Icon.cs (4)
619return new Bitmap(stream); 632bitmap = new Bitmap(Size.Width, Size.Height, PixelFormat.Format32bppArgb); 691bitmap = new Bitmap(bmpData.Width, bmpData.Height, PixelFormat.Format32bppArgb); 738bitmap = new Bitmap(size.Width, size.Height); // initialized to transparent
System\Drawing\Image.cs (2)
783return new Bitmap(bitmap); 860GdiPlus.ImageType.ImageTypeBitmap => new Bitmap((GpBitmap*)nativeImage),
System\Drawing\ToolboxBitmapAttribute.cs (4)
77image = new Bitmap((Bitmap)_smallImage, s_largeSize.Width, s_largeSize.Height); 193Bitmap? bitmap = new Bitmap(stream); 198image = new Bitmap(bitmap, s_largeSize.Width, s_largeSize.Height); 317Bitmap bitmap = new(stream);
System.Windows.Forms (27)
System\Windows\Forms\Control.cs (1)
5006using Bitmap image = new(width, height, bitmap.PixelFormat);
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
77using Bitmap bitmap = new(2, 2);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (1)
308Bitmap bitmap = new(fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1356Bitmap bitmap = new(fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
834bmFlipXPThemes = FlipXPThemesBitmap = new Bitmap(backgroundBounds.Width, backgroundBounds.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
702using Bitmap bmFlipXPThemes = new(backgroundBounds.Height, backgroundBounds.Width);
System\Windows\Forms\Controls\ImageList\ImageList.cs (4)
300bitmap = new Bitmap((Image)original._image); 336bitmap = new Bitmap(source, ImageSize); 631result = new Bitmap(_imageSize.Width, _imageSize.Height, PixelFormat.Format32bppArgb); 659result = new Bitmap(_imageSize.Width, _imageSize.Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (1)
2089_largeButtonImages.Images.Add(new Bitmap(bitmap, s_largeButtonSize.Width, s_largeButtonSize.Height));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
974return new Bitmap(size.Width, size.Height);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (1)
220_sizeGripGlyph = new Bitmap(s_resizeGripSize, s_resizeGripSize, g);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
2645using Bitmap image = new(bounds.Width, bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
707Bitmap image = new(16, 16);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (2)
919using Bitmap textBmp = new(textSize.Width, textSize.Height, PixelFormat.Format32bppPArgb); 1170Bitmap disabledBitmap = new(size.Width, size.Height);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
375_cachedBitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb);
System\Windows\Forms\Nrbf\WinFormsSerializationRecordExtensions.cs (1)
53bitmap = new Bitmap(new MemoryStream(data.GetArray()));
System\Windows\Forms\Rendering\ControlPaint.cs (8)
1399Bitmap bitmap = new(rectangle.Width, rectangle.Height); 1469using Bitmap bitmap = new(width, height); 1562using Bitmap bitmap = new(width, height); 1661using Bitmap bitmap = new(image.Width, image.Height); 2153using Bitmap bitmap = new(patternSize, patternSize); 2204using Bitmap b = new(2, 2); 2280using Bitmap bitmap = new(patternSize, patternSize); 2485Bitmap result = new(bitmap.Width, bitmap.Height, bitmap.PixelFormat);
System.Windows.Forms.Design (14)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (1)
290_swatch = new Bitmap(width, height);
System\Drawing\Design\BitmapEditor.cs (1)
19protected override Image LoadFromStream(Stream stream) => new Bitmap(stream);
System\Drawing\Design\ToolboxItem.cs (1)
607itemBitmap = new Bitmap(itemBitmap, new Size(s_iconWidth, s_iconHeight));
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (1)
1013_dragImage = new Bitmap(imageWidth, imageHeight, Drawing.Imaging.PixelFormat.Format32bppPArgb);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
90_image = new Bitmap(typeof(ToolStripPanelSelectionGlyph), fileName);
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (1)
78s_selectedColumnsItemBitmap = new Bitmap(
System\Windows\Forms\Design\DesignBindingPicker.cs (3)
161Bitmap addNewBitmap = new( 289Bitmap addNewBitmap = new(typeof(DesignBindingPicker), "AddNewDataSource.bmp"); 1903Bitmap images = new(typeof(DesignBindingPicker), "DataPickerImages.bmp");
System\Windows\Forms\Design\DesignBindingValueUIHandler.cs (1)
24_dataBitmap = new Bitmap(typeof(DesignBindingValueUIHandler), "BoundProperty.bmp");
System\Windows\Forms\Design\DesignerUtils.cs (3)
120s_boxImage = new Bitmap(s_boxImageSize, s_boxImageSize, PixelFormat.Format32bppPArgb); 389image = new Bitmap( 422image = new Bitmap(
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
583image = new Bitmap(typeof(ToolStripItemEditorForm), "BlankToolstrip.bmp");
System.Windows.Forms.Primitives (2)
System\Windows\Forms\Internals\ScaleHelper.cs (2)
147Bitmap copy = new(bitmap); 177Bitmap scaledBitmap = new(desiredSize.Width, desiredSize.Height, bitmap.PixelFormat);
WindowsFormsIntegration (4)
System\Windows\Integration\HostUtils.cs (4)
178SD.Bitmap bitmap = new SD.Bitmap(control.ClientRectangle.Width, control.ClientRectangle.Height); 196SD.Bitmap returnBitmap = new SD.Bitmap(childElementHost.ClientRectangle.Width, childElementHost.ClientRectangle.Height); 280return new SD.Bitmap(1, 1); 297SD.Bitmap chunk = new System.Drawing.Bitmap(width, height, graphicsTemplate);
340 references to Bitmap
PresentationFramework-SystemDrawing (8)
SystemDrawingExtension.cs (8)
23internal override bool IsBitmap(object? data) => data is Bitmap; 41Bitmap? bitmapData = GetBitmapImpl(data); 57internal override nint GetHBitmapFromBitmap(object? data) => data is Bitmap bitmap ? bitmap.GetHbitmap() : 0; 68Bitmap bmp = new Bitmap(bitmapwidth, bitmapheight); 78Bitmap bitmap = new(stream); 96private static Bitmap? GetBitmapImpl(object? data) 115return data as Bitmap; 125Bitmap bitmapFinal = new(imageWidth, imageHeight, PixelFormat.Format32bppRgb);
PresentationUI (20)
src\wpf\artifacts\obj\PresentationUI\x64\Release\net11.0\MS.Internal.Documents.Resources.cs (20)
74internal static System.Drawing.Bitmap Invalid_35x35 { 77return ((System.Drawing.Bitmap)(obj)); 84internal static System.Drawing.Bitmap Invalid_48x48 { 87return ((System.Drawing.Bitmap)(obj)); 94internal static System.Drawing.Bitmap NotSigned_35x35 { 97return ((System.Drawing.Bitmap)(obj)); 104internal static System.Drawing.Bitmap NotSigned_48x48 { 107return ((System.Drawing.Bitmap)(obj)); 144internal static System.Drawing.Bitmap Undetermined_35x35 { 147return ((System.Drawing.Bitmap)(obj)); 154internal static System.Drawing.Bitmap Undetermined_48x48 { 157return ((System.Drawing.Bitmap)(obj)); 164internal static System.Drawing.Bitmap Unverifiable_35x35 { 167return ((System.Drawing.Bitmap)(obj)); 174internal static System.Drawing.Bitmap Unverifiable_48x48 { 177return ((System.Drawing.Bitmap)(obj)); 184internal static System.Drawing.Bitmap Valid_35x35 { 187return ((System.Drawing.Bitmap)(obj)); 194internal static System.Drawing.Bitmap Valid_48x48 { 197return ((System.Drawing.Bitmap)(obj));
System.Drawing (1)
System.Drawing.cs (1)
4[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Drawing.Bitmap))]
System.Drawing.Common (50)
misc\DpiHelper.cs (9)
103private static Bitmap ScaleBitmapToSize(Bitmap logicalImage, Size deviceImageSize) 105Bitmap deviceImage = new(deviceImageSize.Width, deviceImageSize.Height, logicalImage.PixelFormat); 129private static Bitmap CreateScaledBitmap(Bitmap logicalImage) 185public static Bitmap? CreateResizedBitmap(Bitmap? logicalImage, Size targetImageSize) 201public static void ScaleBitmapLogicalToDevice([NotNullIfNotNull(nameof(logicalBitmap))] ref Bitmap? logicalBitmap) 208Bitmap deviceBitmap = CreateScaledBitmap(logicalBitmap);
System\Drawing\Bitmap.cs (5)
134public static Bitmap FromHicon(IntPtr hicon) 141public static Bitmap FromResource(IntPtr hinstance, string bitmapName) 187public Bitmap Clone(RectangleF rect, PixelFormat format) 240using Bitmap result = new(size.Width, size.Height, PixelFormat.Format32bppArgb); 342public Bitmap Clone(Rectangle rect, PixelFormat format)
System\Drawing\Icon.cs (6)
607public Bitmap ToBitmap() 625private Bitmap BmpFrame() 627Bitmap? bitmap = null; 674Bitmap? tmpBitmap = null; 744using var tmpBitmap = Bitmap.FromHicon(Handle);
System\Drawing\IconConverter.cs (2)
20|| destinationType == typeof(Image) || destinationType == typeof(Bitmap); 50else if (destinationType == typeof(Image) || destinationType == typeof(Bitmap))
System\Drawing\Image.cs (4)
772/// Creates a <see cref='Bitmap'/> from a Windows handle. 774public static Bitmap FromHbitmap(IntPtr hbitmap) => FromHbitmap(hbitmap, IntPtr.Zero); 777/// Creates a <see cref='Bitmap'/> from the specified Windows handle with the specified color palette. 779public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
System\Drawing\Imaging\BitmapData.cs (4)
22/// Specifies the pixel width of the <see cref='Bitmap'/>. 31/// Specifies the pixel height of the <see cref='Bitmap'/>. 40/// Specifies the stride width of the <see cref='Bitmap'/>. 49/// Specifies the format of the pixel information in this <see cref='Bitmap'/>.
System\Drawing\Imaging\CachedBitmap.cs (3)
11/// A device dependent copy of a <see cref="Bitmap"/> matching a specified <see cref="Graphics"/> object's current 36/// <param name="bitmap">The <see cref="Bitmap"/> to convert.</param> 43public CachedBitmap(Bitmap bitmap, Graphics graphics)
System\Drawing\Imaging\ColorAdjustType.cs (1)
18/// Defines color adjustment information for <see cref='Drawing.Bitmap'/> objects.
System\Drawing\Imaging\ColorPalette.cs (1)
57public static ColorPalette CreateOptimalPalette(int colors, bool useTransparentColor, Bitmap bitmap) =>
System\Drawing\Imaging\DitherType.cs (3)
16/// <see cref="Bitmap.ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette?, float)"/> 24/// <see cref="Bitmap.ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette?, float)"/> method. 67/// <see cref="Bitmap.ConvertFormat(PixelFormat, DitherType, PaletteType, ColorPalette?, float)"/> method.
System\Drawing\PointerExtensions.cs (1)
27public static GpBitmap* Pointer(this Bitmap? bitmap) => bitmap is null ? null : ((IPointer<GpBitmap>)bitmap).GetPointer();
System\Drawing\ToolboxBitmapAttribute.cs (11)
77image = new Bitmap((Bitmap)_smallImage, s_largeSize.Width, s_largeSize.Height); 80if (image is Bitmap b) 119private static Bitmap? GetIconFromStream(Stream? stream, bool large, bool scaled) 126Bitmap? bitmap = null; 164Bitmap? b = image as Bitmap; 193Bitmap? bitmap = new Bitmap(stream); 203bitmap = (Bitmap)image; 216private static Bitmap? GetIconFromResource(Type t, string? bitmapName, bool large, bool scaled) => 294private static void MakeBackgroundAlphaZero(Bitmap img) 317Bitmap bitmap = new(stream);
System.Windows.Forms (160)
System\Drawing\Design\UITypeEditor.cs (1)
52[typeof(Bitmap)] = $"System.Drawing.Design.BitmapEditor, {Assemblies.SystemDrawingDesign}",
System\Resources\ResxFileRef.Converter.cs (1)
137if (toCreate == typeof(Bitmap) && fileName.EndsWith(".ico", StringComparison.Ordinal))
System\Windows\Forms\ActiveX\AxHost.cs (1)
1007public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormatWriter.cs (3)
17public static void WriteBitmap(Stream stream, Bitmap bitmap) 28new ClassInfo(1, typeof(Bitmap).FullName!, s_dataMemberName), 67else if (value is Bitmap bitmap)
System\Windows\Forms\ComponentModel\COM2Interop\COM2PictureConverter.cs (3)
21private Type _pictureType = typeof(Bitmap); 70_pictureType = typeof(Bitmap); 109else if (managedValue is Bitmap bitmap)
System\Windows\Forms\Control.cs (10)
4870/// <inheritdoc cref="DoDragDropAsJson{T}(T, DragDropEffects, Bitmap?, Point, bool)"/> 4897Bitmap? dragImage, 4926/// should either be a base managed class (<see cref="string"/>, <see cref="Bitmap"/>, 4942/// Because <see cref="DoDragDrop(object, DragDropEffects, Bitmap, Point, bool)"/> always performs the 4943/// RGB multiplication step in calculating the alpha value, you should always pass a <see cref="Bitmap"/> 4944/// without pre-multiplied alpha blending. Note that no error will result from passing a <see cref="Bitmap"/> 4952Bitmap? dragImage, 4988public void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds) 5006using Bitmap image = new(width, height, bitmap.PixelFormat); 6449public void ScaleBitmapLogicalToDevice(ref Bitmap logicalBitmap)
System\Windows\Forms\Controls\Buttons\ButtonInternal\ButtonBaseAdapter.cs (1)
77using Bitmap bitmap = new(2, 2);
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (6)
13private static Bitmap? t_checkImageChecked; 18private static Bitmap? t_checkImageIndeterminate; 182Bitmap checkImage; 294private static Bitmap GetCheckBoxImage(Color checkColor, Rectangle fullSize, ref Color cacheCheckColor, ref Bitmap? cacheCheckImage) 308Bitmap bitmap = new(fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
47private static Bitmap? s_errorBmp; 1275private static Bitmap GetBitmap(string bitmapName) =>
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (2)
29private static Bitmap? s_checkImage; 1356Bitmap bitmap = new(fullSize.Width, fullSize.Height);
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnHeaderCell.cs (1)
829Bitmap? bmFlipXPThemes = FlipXPThemesBitmap;
System\Windows\Forms\Controls\DataGridView\DataGridViewHeaderCell.cs (2)
78internal Bitmap? FlipXPThemesBitmap 80get => Properties.GetValueOrDefault<Bitmap?>(s_propFlipXPThemesBitmap);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (2)
18private static Bitmap? s_errorBitmap; 75internal static Bitmap ErrorBitmap =>
System\Windows\Forms\Controls\DataGridView\DataGridViewImageColumn.cs (1)
222DefaultCellStyle.NullValue is Bitmap bitmap &&
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (22)
16private static Bitmap? s_rightArrowBmp; 17private static Bitmap? s_leftArrowBmp; 18private static Bitmap? s_rightArrowStarBmp; 19private static Bitmap? s_leftArrowStarBmp; 20private static Bitmap? s_pencilLTRBmp; 21private static Bitmap? s_pencilRTLBmp; 22private static Bitmap? s_starBmp; 37private static Bitmap LeftArrowBitmap => s_leftArrowBmp ??= GetBitmapFromIcon("DataGridViewRow.left"); 39private static Bitmap LeftArrowStarBitmap => s_leftArrowStarBmp ??= GetBitmapFromIcon("DataGridViewRow.leftstar"); 41private static Bitmap PencilLTRBitmap => s_pencilLTRBmp ??= GetBitmapFromIcon("DataGridViewRow.pencil_ltr"); 43private static Bitmap PencilRTLBitmap => s_pencilRTLBmp ??= GetBitmapFromIcon("DataGridViewRow.pencil_rtl"); 45private static Bitmap RightArrowBitmap => s_rightArrowBmp ??= GetBitmapFromIcon("DataGridViewRow.right"); 47private static Bitmap RightArrowStarBitmap => s_rightArrowStarBmp ??= GetBitmapFromIcon("DataGridViewRow.rightstar"); 49private static Bitmap StarBitmap => s_starBmp ??= GetBitmapFromIcon("DataGridViewRow.star"); 73private static Bitmap GetArrowBitmap(bool rightToLeft) => 78private static Bitmap GetArrowStarBitmap(bool rightToLeft) => 83private static Bitmap GetBitmapFromIcon(string iconName) => 501private static Bitmap GetPencilBitmap(bool rightToLeft) => 702using Bitmap bmFlipXPThemes = new(backgroundBounds.Height, backgroundBounds.Width); 762Bitmap? bmp = null; 1023Bitmap bmp, 1048using Bitmap invertedBitmap = ControlPaint.CreateBitmapWithInvertedForeColor(bmp, backColor);
System\Windows\Forms\Controls\ImageList\ImageList.cs (11)
279private Bitmap CreateBitmap(Original original, out bool ownsBitmap) 288Bitmap bitmap; 289if (original._image is Bitmap originalBitmap) 308Bitmap source = bitmap; 309bitmap = (Bitmap)bitmap.Clone(); 335Bitmap source = bitmap; 369private int AddToHandle(Bitmap bitmap) 448Bitmap bitmapValue = CreateBitmap(original, out bool ownsBitmap); 600private Bitmap GetBitmap(int index) 605Bitmap? result = null; 618Bitmap? tmpBitmap = null;
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (4)
140if (value is not Bitmap bitmap) 151bitmap = (Bitmap)bitmap.Clone(); 312if (original._image is Bitmap) 321Bitmap bitmapValue = _owner.CreateBitmap(original, out bool ownsBitmap);
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (10)
38private Bitmap? _alphaBitmap; 39private Bitmap? _categoryBitmap; 40private Bitmap? _propertyPageBitmap; 1310private int AddImage(Bitmap image) 2087if (images[i] is Bitmap bitmap) 2096private void AddLargeImage(Bitmap? originalBitmap) 2105Bitmap largeBitmap = ScaleHelper.CopyAndScaleToSize(originalBitmap, s_largeButtonSize); 4006protected virtual Bitmap SortByPropertyImage => ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(PropertyGrid), "PBAlpha"); 4014protected virtual Bitmap SortByCategoryImage => ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(PropertyGrid), "PBCategory"); 4022protected virtual Bitmap ShowPropertyPageImage => ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(PropertyGrid), "PBPPage");
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\DropDownButton.DropDownButtonAdapter.cs (1)
92if (ControlPaint.IsDark(backgroundColor) && image is Bitmap bitmap)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1713using Bitmap bitmap = Image.FromHbitmap(compatibleBitmap);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridErrorDialog.cs (2)
25private readonly Bitmap _expandImage; 26private readonly Bitmap _collapseImage;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (2)
213Bitmap bitmap = CreateResizedBitmap( 959private Bitmap CreateResizedBitmap(string icon, int width, int height)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
44private Bitmap? _sizeGripGlyph; 208private Bitmap GetSizeGripGlyph(Graphics g)
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1603public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (1)
2645using Bitmap image = new(bounds.Width, bounds.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (8)
1057if (value is Bitmap bmp && ImageTransparentColor != Color.Empty) 1094if (Image is Bitmap currentImage && value != Color.Empty) 2142/// either be a base managed class (<see cref="string"/>, <see cref="Bitmap"/>, or <see cref="Metafile"/>) 2158/// Because <see cref="DoDragDrop(object, DragDropEffects, Bitmap, Point, bool)"/> always performs the 2159/// RGB multiplication step in calculating the alpha value, you should always pass a <see cref="Bitmap"/> 2160/// without pre-multiplied alpha blending. Note that no error will result from passing a <see cref="Bitmap"/> 2165public unsafe DragDropEffects DoDragDrop(object data, DragDropEffects allowedEffects, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 2224internal IDropSource.Interface CreateDropSource(IComVisibleDataObject dataObject, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage)
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
655private unsafe Bitmap? GetNativeMenuItemImage() 707Bitmap image = new(16, 16);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (4)
866if (SystemInformation.HighContrast && image is Bitmap bitmap) 919using Bitmap textBmp = new(textSize.Width, textSize.Height, PixelFormat.Format32bppPArgb); 1160private static Bitmap CreateDisabledImage(Image normalImage, ImageAttributes? imgAttrib) 1170Bitmap disabledBitmap = new(size.Width, size.Height);
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.cs (2)
18private static Bitmap? t_upScrollImage; 21private static Bitmap? t_downScrollImage;
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
33private Bitmap? _cachedBitmap;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (1)
159public new void DrawToBitmap(Bitmap bitmap, Rectangle targetBounds)
System\Windows\Forms\DataBinding\BindingNavigator.cs (6)
181Bitmap moveFirstImage = ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(BindingNavigator), "BindingNavigator.MoveFirst"); 182Bitmap movePreviousImage = ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(BindingNavigator), "BindingNavigator.MovePrevious"); 183Bitmap moveNextImage = ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(BindingNavigator), "BindingNavigator.MoveNext"); 184Bitmap moveLastImage = ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(BindingNavigator), "BindingNavigator.MoveLast"); 185Bitmap addNewImage = ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(BindingNavigator), "BindingNavigator.AddNew"); 186Bitmap deleteImage = ScaleHelper.GetIconResourceAsDefaultSizeBitmap(typeof(BindingNavigator), "BindingNavigator.Delete");
System\Windows\Forms\Design\PropertyTab.cs (2)
32private Bitmap? _bitmap; 38public virtual Bitmap? Bitmap
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (4)
100/// <see cref="Bitmap"/> instance. 102/// <param name="image">The <see cref="Bitmap"/> instance.</param> 111public TaskDialogIcon(Bitmap image) 188private static Icon BitmapToIcon(Bitmap bitmap)
System\Windows\Forms\Dialogs\ThreadExceptionDialog.cs (2)
66private Bitmap? _expandImage; 67private Bitmap? _collapseImage;
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
43Bitmap bitmap = _icon.ToBitmap();
System\Windows\Forms\GiveFeedbackEventArgs.cs (2)
26public GiveFeedbackEventArgs(DragDropEffects effect, bool useDefaultCursors, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage) 53public Bitmap? DragImage { get; set; }
System\Windows\Forms\MDI\MDIControlStrip.cs (1)
78private Bitmap GetTargetWindowIcon()
System\Windows\Forms\Nrbf\WinFormsNrbfSerializer.cs (3)
32{ Types.ToTypeName($"{Types.BitmapType}, System.Drawing"), typeof(Bitmap) }, 33{ Types.ToTypeName($"{Types.BitmapType}, System.Drawing.Common"), typeof(Bitmap) } 50|| type == typeof(Bitmap);
System\Windows\Forms\Nrbf\WinFormsSerializationRecordExtensions.cs (2)
39/// Tries to get a record as a binary formatted <see cref="Bitmap"/>. 46|| !types.TypeNameMatches(typeof(Bitmap))
System\Windows\Forms\OLE\Clipboard.cs (2)
375/// Retrieves a <see cref="Bitmap"/> from the <see cref="Clipboard"/>. 378/// <see cref="Bitmap"/>s are re-hydrated from a <see cref="SerializationRecord"/> by reading a byte array.
System\Windows\Forms\OLE\DropSource.cs (1)
20public DropSource(ISupportOleDropSource peer, IComVisibleDataObject dataObject, Bitmap? dragImage, Point cursorOffset, bool useDefaultDragImage)
System\Windows\Forms\OLE\WinFormsOleServices.cs (8)
47if (format.Equals(DataFormatNames.Bitmap) && data is Bitmap bitmap) 66&& (typeof(Bitmap) == typeof(T) || typeof(Image) == typeof(T)) 67&& TryGetBitmapData(dataObject, out Bitmap? bitmap)) 76static unsafe bool TryGetBitmapData(Com.IDataObject* dataObject, [NotNullWhen(true)] out Bitmap? data) 109&& Image.FromHbitmap(medium.hGlobal) is Bitmap clipboardBitmap) 111data = (Bitmap)clipboardBitmap.Clone(); 134if (data is Bitmap && format.Equals(DataFormatNames.Dib)) 142DataFormatNames.Bitmap or DataFormatNames.BinaryFormatBitmap => type == typeof(Bitmap) || type == typeof(Image),
System\Windows\Forms\Rendering\ControlPaint.cs (15)
19private static Bitmap? t_checkImage; // image used to render checkmarks 173public static unsafe IntPtr CreateHBitmap16Bit(Bitmap bitmap, Color background) 269public static unsafe IntPtr CreateHBitmapTransparencyMask(Bitmap bitmap) 328public static IntPtr CreateHBitmapColorMask(Bitmap bitmap, IntPtr monochromeMask) 1399Bitmap bitmap = new(rectangle.Width, rectangle.Height); 1469using Bitmap bitmap = new(width, height); 1562using Bitmap bitmap = new(width, height); 1661using Bitmap bitmap = new(image.Width, image.Height); 2153using Bitmap bitmap = new(patternSize, patternSize); 2204using Bitmap b = new(2, 2); 2280using Bitmap bitmap = new(patternSize, patternSize); 2462internal static void InvertForeColorIfNeeded(Bitmap bitmap, Color backgroundColor) 2483internal static Bitmap CreateBitmapWithInvertedForeColor(Bitmap bitmap, Color backgroundColor) 2485Bitmap result = new(bitmap.Width, bitmap.Height, bitmap.PixelFormat);
System.Windows.Forms.Design (60)
DataSourceDescriptor.cs (1)
12public abstract Bitmap Image { get; }
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
1113if (button?.Image is not Bitmap buttonBitmap)
System\ComponentModel\Design\DataSourceDescriptor.cs (1)
12public abstract Bitmap Image { get; }
System\ComponentModel\Design\DataSourceGroup.cs (1)
12public abstract Bitmap Image { get; }
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.EditorButton.cs (1)
126using Bitmap arrowBitmap = icon.ToBitmap();
System\Drawing\Design\ToolboxItem.cs (7)
77public Bitmap? Bitmap 79get => (Bitmap?)Properties["Bitmap"]; 87public Bitmap? OriginalBitmap 89get => (Bitmap?)Properties["OriginalBitmap"]; 599Bitmap? itemBitmap = attr.GetImage(type, false) as Bitmap; 772ValidatePropertyType(propertyName, value, typeof(Bitmap), true);
System\Windows\Forms\Design\Behavior\ContainerSelectorGlyph.cs (1)
16private Bitmap? _glyph;
System\Windows\Forms\Design\Behavior\DesignerActionGlyph.cs (2)
27private Bitmap? _glyphImageClosed; 28private Bitmap? _glyphImageOpened;
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (2)
27public Bitmap dragImage; // bitblt'd image of control 1019((Bitmap)_dragImage).MakeTransparent(Color.Chartreuse);
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (1)
15private Bitmap? _image;
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (4)
43private static Bitmap? s_selectedColumnsItemBitmap; 57if (_moveUp.Image is Bitmap moveUp) 62if (_moveDown.Image is Bitmap moveDown) 72private static Bitmap SelectedColumnsItemBitmap
System\Windows\Forms\Design\DataSourceGroup.cs (1)
12public abstract Bitmap Image { get; }
System\Windows\Forms\Design\DesignBindingPicker.cs (5)
161Bitmap addNewBitmap = new( 289Bitmap addNewBitmap = new(typeof(DesignBindingPicker), "AddNewDataSource.bmp"); 1903Bitmap images = new(typeof(DesignBindingPicker), "DataPickerImages.bmp"); 1945Bitmap scaledImage = ScaleHelper.CopyAndScaleToSize((Bitmap)image, scaledSize);
System\Windows\Forms\Design\DesignBindingValueUIHandler.cs (2)
16private Bitmap? _dataBitmap; 18internal Bitmap DataBitmap
System\Windows\Forms\Design\DesignerUtils.cs (5)
37private static Bitmap? s_boxImage; 312public static void GenerateSnapShot(Control control, out Bitmap image, int borderSize, double opacity, Color backColor) 385public static void GenerateSnapShotWithBitBlt(Control control, out Bitmap image) 420public static bool GenerateSnapShotWithWM_PRINT(Control control, out Bitmap image) 655private static unsafe void SetImageAlpha(Bitmap b, double opacity)
System\Windows\Forms\Design\ImageListDesigner.OriginalImageCollection.cs (1)
121_items.Add(new ImageListImage((Bitmap)_owner.ImageList.Images[i], imageKeys[i]));
System\Windows\Forms\Design\ImageListImage.cs (1)
57return new ImageListImage((Bitmap)Image.FromStream(stream));
System\Windows\Forms\Design\InheritanceUI.cs (2)
14private static Bitmap? s_inheritanceGlyph; 21public static Bitmap InheritanceGlyph =>
System\Windows\Forms\Design\StandardMenuStripVerb.cs (4)
165Bitmap image = null; 325Bitmap image = null; 390private static Bitmap GetImage(string name) 392Bitmap image = null;
System\Windows\Forms\Design\StyleEditorForm.cs (2)
351_infoPictureBox1.Image = ScaleHelper.ScaleToDpi(_infoPictureBox1.Image as Bitmap, ScaleHelper.InitialSystemDpi); 352_infoPictureBox2.Image = ScaleHelper.ScaleToDpi(_infoPictureBox2.Image as Bitmap, ScaleHelper.InitialSystemDpi);
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (2)
352if (button?.Image is not Bitmap buttonBitmap) 729Bitmap tbxBitmap = ToolStripDesignerUtils.GetToolboxBitmap(itemType);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (6)
32private static Dictionary<Type, Bitmap> t_cachedWinformsImages; 132private static Bitmap GetKnownToolboxBitmap(Type itemType) 136if (!t_cachedWinformsImages.TryGetValue(itemType, out Bitmap value)) 138Bitmap knownImage = ToolboxBitmapAttribute.GetImageFromResource(itemType, null, false) as Bitmap; 147public static Bitmap GetToolboxBitmap(Type itemType)
System\Windows\Forms\Design\TreeNodeCollectionEditor.cs (3)
69if (_moveDownButton.Image is Bitmap moveDown) 74if (_moveUpButton.Image is Bitmap moveUp) 79if (_btnDelete.Image is Bitmap delete)
System\Windows\Forms\Design\VsPropertyGrid.cs (4)
16protected override Bitmap SortByPropertyImage => GetBitmap("PBAlpha"); 18protected override Bitmap SortByCategoryImage => GetBitmap("PBCategory"); 20protected override Bitmap ShowPropertyPageImage => GetBitmap("PBPPage"); 22private static Bitmap GetBitmap(string resourceName)
System.Windows.Forms.Primitives (26)
System\Windows\Forms\Internals\ScaleHelper.cs (25)
125/// Copies the given <see cref="Bitmap"/>, scaling if needed. 127/// <inheritdoc cref="ScaleToSize(Bitmap, Size, bool, bool)"/> 128internal static Bitmap CopyAndScaleToSize(Bitmap bitmap, Size desiredSize) 132/// Scales the given <see cref="Bitmap"/> to the desired size if needed. 140private static Bitmap ScaleToSize(Bitmap bitmap, Size desiredSize, bool disposeBitmap = false, bool alwaysCopy = false) 147Bitmap copy = new(bitmap); 177Bitmap scaledBitmap = new(desiredSize.Width, desiredSize.Height, bitmap.PixelFormat); 179using (Bitmap? dispose = disposeBitmap ? bitmap : null) 204/// Scales a logical (100%) <see cref="Bitmap"/> value to the specified DPI. 206/// <param name="logicalBitmap"><see cref="Bitmap"/> in logical units (pixels at 100%).</param> 207/// <returns>Scaled <see cref="Bitmap"/>.</returns> 208internal static Bitmap ScaleToDpi(Bitmap logicalBitmap, int dpi, bool disposeBitmap = false) => 316/// Gets the given icon resource as a <see cref="Bitmap"/> at the default icon size. 318internal static Bitmap GetIconResourceAsDefaultSizeBitmap(Type type, string resource) => 322/// Gets the given small icon (usually 16x16) resource as a <see cref="Bitmap"/> scaled to the specified dpi. 324internal static Bitmap GetSmallIconResourceAsBitmap(Type type, string resource, int dpi) => 328/// Gets the given icon resource as a <see cref="Bitmap"/> of the given size. 330internal static Bitmap GetIconResourceAsBitmap(Type type, string resource, Size size) 344/// Gets the given icon resource that is closest to the given size as a <see cref="Bitmap"/>. 346internal static Bitmap GetIconResourceAsBestMatchBitmap(Stream resourceStream, Size size) 355/// Gets the given icon resource that is closest to the given size as a <see cref="Bitmap"/>. 357internal static Bitmap GetIconResourceAsBestMatchBitmap(Type type, string resource, Size size)
System\Windows\Forms\SystemDrawingExtensions.cs (1)
13internal static HBITMAP GetHBITMAP(this Bitmap bitmap) => (HBITMAP)bitmap.GetHbitmap();
WindowsFormsIntegration (15)
System\Windows\Integration\ElementHost.cs (1)
414using (SD.Bitmap bitmap = HostUtils.GetBitmapFromRenderTargetBitmap(this, renderBitmap, new Point(0, 0)))
System\Windows\Integration\ElementHostPropertyMap.cs (2)
69using (SD.Bitmap parentBitmap = HostUtils.GetCoveredPortionOfBitmap(parent, host)) 77using (SD.Bitmap elementHostBitmap = HostUtils.GetBitmapOfControl(host, host))
System\Windows\Integration\HostUtils.cs (11)
143internal static void SetBackgroundImage(WinFormsAdapter adapter, Control child, SD.Bitmap image) 156internal static SD.Bitmap GetBitmapForWindowsFormsHost(WindowsFormsHost host, Brush brush) 171internal static SD.Bitmap GetBitmapOfControl(Control control, ElementHost host) 178SD.Bitmap bitmap = new SD.Bitmap(control.ClientRectangle.Width, control.ClientRectangle.Height); 192internal static SD.Bitmap GetCoveredPortionOfBitmap(Control parentControl, ElementHost childElementHost) 194using (SD.Bitmap parentBitmap = GetBitmapOfControl(parentControl, childElementHost)) 196SD.Bitmap returnBitmap = new SD.Bitmap(childElementHost.ClientRectangle.Width, childElementHost.ClientRectangle.Height); 222internal static SD.Bitmap GetBitmapForTransparentWindowsFormsHost(WindowsFormsHost host) 276internal static SD.Bitmap GetBitmapFromRenderTargetBitmap(Control control, RenderTargetBitmap bmp, Point offset) 297SD.Bitmap chunk = new System.Drawing.Bitmap(width, height, graphicsTemplate); 325internal static SD.Bitmap GetBitmapForOpaqueWindowsFormsHost(WindowsFormsHost host, Brush brush)
System\Windows\Integration\WindowsFormsHostPropertyMap.cs (1)
88SD.Bitmap backgroundImage = HostUtils.GetBitmapForWindowsFormsHost(windowsFormsHost, brush);