46 references to Bitmap
System.Windows.Forms (8)
System\Windows\Forms\OLE\Clipboard.cs (4)
209
/// Indicates whether there is data on the Clipboard that is in the <see cref="DataFormats.
Bitmap
"/> format
212
public static bool ContainsImage() => ContainsData(DataFormats.
Bitmap
, autoConvert: true);
453
public static Image? GetImage() => GetTypedDataIfAvailable<Image>(DataFormats.
Bitmap
);
599
/// 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)
149
if (format.Equals(DataFormats.
Bitmap
) && data is Bitmap bitmap)
System\Windows\Forms\OLE\DataObject.cs (1)
336
public virtual Image? GetImage() => GetData(DataFormats.
Bitmap
, autoConvert: true) as Image;
System\Windows\Forms\OLE\DataObject.DataStore.cs (1)
98
format = autoConvert ? DataFormats.
Bitmap
: throw new NotSupportedException(SR.DataObjectDibNotSupported);
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 (37)
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)
89
theoryData.Add(format, null, format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
90
theoryData.Add(format, "input", format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
144
theoryData.Add(format, autoConvert, null, format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
145
theoryData.Add(format, autoConvert, "input", format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
System\Windows\Forms\DataObjectTests.cs (31)
40
DataFormats.
Bitmap
,
126
.Setup(o => o.GetDataPresent(DataFormats.
Bitmap
, true))
130
mockDataObject.Verify(o => o.GetDataPresent(DataFormats.
Bitmap
, true), Times.Once());
441
string format = DataFormats.
Bitmap
;
477
string format = DataFormats.
Bitmap
;
502
string format = DataFormats.
Bitmap
;
826
dataObject.SetData(DataFormats.
Bitmap
, result);
839
.Setup(o => o.GetData(DataFormats.
Bitmap
, true))
843
mockDataObject.Verify(o => o.GetData(DataFormats.
Bitmap
, true), Times.Once());
1170
theoryData.Add(format, null, format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
1171
theoryData.Add(format, "input", format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
1260
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: true).Should().BeSameAs(image);
1261
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: false).Should().BeSameAs(image);
1268
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: true).Should().BeTrue();
1269
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: false).Should().BeTrue();
1314
theoryData.Add(format, autoConvert, null, format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
1315
theoryData.Add(format, autoConvert, "input", format == DataFormats.FileDrop, format == DataFormats.
Bitmap
);
1413
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: true).Should().BeSameAs(image);
1414
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: false).Should().BeSameAs(image);
1421
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: true).Should().BeTrue();
1422
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: false).Should().BeTrue();
1594
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: true).Should().BeSameAs(image);
1595
dataObject.GetData(DataFormats.
Bitmap
, autoConvert: false).Should().BeSameAs(image);
1602
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: true).Should().BeTrue();
1603
dataObject.GetDataPresent(DataFormats.
Bitmap
, autoConvert: false).Should().BeTrue();
1620
.Setup(o => o.SetData(DataFormats.
Bitmap
, true, image))
1623
mockDataObject.Verify(o => o.SetData(DataFormats.
Bitmap
, true, image), Times.Once());
1633
.Setup(o => o.SetData(DataFormats.
Bitmap
, true, image))
1637
mockDataObject.Verify(o => o.SetData(DataFormats.
Bitmap
, true, image), Times.Once());
2024
{ DataFormats.
Bitmap
, TYMED.TYMED_GDI },
2166
.Returns(["Format1", DataFormats.
Bitmap
, "Format2"]);
System.Windows.Forms.TestUtilities (1)
DataObjectTestHelpers.cs (1)
51
DataFormats.
Bitmap
,