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