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