38 references to Bitmap
System.Windows.Forms (8)
System\Windows\Forms\OLE\Clipboard.cs (4)
198
/// Indicates whether there is data on the Clipboard that is in the <see cref="DataFormats.
Bitmap
"/> format
201
public static bool ContainsImage() => ContainsData(DataFormats.
Bitmap
, autoConvert: true);
253
public 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.
System\Windows\Forms\OLE\DataObject.Composition.WinFormsToNativeAdapter.cs (1)
138
if (format.Equals(DataFormats.
Bitmap
) && data is Bitmap bitmap)
System\Windows\Forms\OLE\DataObject.cs (1)
151
public virtual Image? GetImage() => GetData(DataFormats.
Bitmap
, autoConvert: true) as Image;
System\Windows\Forms\OLE\DataObject.DataStore.cs (1)
95
format = DataFormats.
Bitmap
;
System\Windows\Forms\OLE\DataObject.FormatEnumerator.cs (1)
50
tymed = format.Equals(DataFormats.
Bitmap
) ? ComTypes.TYMED.TYMED_GDI : ComTypes.TYMED.TYMED_HGLOBAL
System.Windows.Forms.Tests (30)
System\Windows\Forms\DataFormatsTests.cs (2)
13
yield return new object[] { DataFormats.
Bitmap
, "Bitmap" };
45
yield return new object[] { DataFormats.
Bitmap
, "Bitmap", 2 };
System\Windows\Forms\DataObjectTests.ClipboardTests.cs (4)
87
theoryData.Add(format, null, format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
88
theoryData.Add(format, "input", format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
142
theoryData.Add(format, autoConvert, null, format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
143
theoryData.Add(format, autoConvert, "input", format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
System\Windows\Forms\DataObjectTests.cs (24)
32
DataFormats.
Bitmap
,
118
.Setup(o => o.GetDataPresent(DataFormats.
Bitmap
, true))
122
mockDataObject.Verify(o => o.GetDataPresent(DataFormats.
Bitmap
, true), Times.Once());
680
dataObject.SetData(DataFormats.
Bitmap
, result);
693
.Setup(o => o.GetData(DataFormats.
Bitmap
, true))
697
mockDataObject.Verify(o => o.GetData(DataFormats.
Bitmap
, true), Times.Once());
1051
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: true).Should().BeSameAs(image);
1052
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: false).Should().BeSameAs(image);
1059
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: true).Should().BeTrue();
1060
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: false).Should().BeTrue();
1131
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: true).Should().BeSameAs(image);
1132
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: false).Should().BeSameAs(image);
1139
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: true).Should().BeTrue();
1140
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: false).Should().BeTrue();
1312
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: true).Should().BeSameAs(image);
1313
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: false).Should().BeSameAs(image);
1320
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: true).Should().BeTrue();
1321
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: false).Should().BeTrue();
1338
.Setup(o => o.SetData(DataFormats.
Bitmap
, true, image))
1341
mockDataObject.Verify(o => o.SetData(DataFormats.
Bitmap
, true, image), Times.Once());
1351
.Setup(o => o.SetData(DataFormats.
Bitmap
, true, image))
1355
mockDataObject.Verify(o => o.SetData(DataFormats.
Bitmap
, true, image), Times.Once());
1742
{ DataFormats.
Bitmap
, TYMED.TYMED_GDI },
1884
.Returns(["Format1", DataFormats.
Bitmap
, "Format2"]);