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 212public static bool ContainsImage() => ContainsData(DataFormats.Bitmap, autoConvert: true); 453public 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)
149if (format.Equals(DataFormats.Bitmap) && data is Bitmap bitmap)
System\Windows\Forms\OLE\DataObject.cs (1)
336public virtual Image? GetImage() => GetData(DataFormats.Bitmap, autoConvert: true) as Image;
System\Windows\Forms\OLE\DataObject.DataStore.cs (1)
98format = autoConvert ? DataFormats.Bitmap : throw new NotSupportedException(SR.DataObjectDibNotSupported);
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 (37)
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)
89theoryData.Add(format, null, format == DataFormats.FileDrop, format == DataFormats.Bitmap); 90theoryData.Add(format, "input", format == DataFormats.FileDrop, format == DataFormats.Bitmap); 144theoryData.Add(format, autoConvert, null, format == DataFormats.FileDrop, format == DataFormats.Bitmap); 145theoryData.Add(format, autoConvert, "input", format == DataFormats.FileDrop, format == DataFormats.Bitmap);
System\Windows\Forms\DataObjectTests.cs (31)
40DataFormats.Bitmap, 126.Setup(o => o.GetDataPresent(DataFormats.Bitmap, true)) 130mockDataObject.Verify(o => o.GetDataPresent(DataFormats.Bitmap, true), Times.Once()); 441string format = DataFormats.Bitmap; 477string format = DataFormats.Bitmap; 502string format = DataFormats.Bitmap; 826dataObject.SetData(DataFormats.Bitmap, result); 839.Setup(o => o.GetData(DataFormats.Bitmap, true)) 843mockDataObject.Verify(o => o.GetData(DataFormats.Bitmap, true), Times.Once()); 1170theoryData.Add(format, null, format == DataFormats.FileDrop, format == DataFormats.Bitmap); 1171theoryData.Add(format, "input", format == DataFormats.FileDrop, format == DataFormats.Bitmap); 1260dataObject.GetData(DataFormats.Bitmap, autoConvert: true).Should().BeSameAs(image); 1261dataObject.GetData(DataFormats.Bitmap, autoConvert: false).Should().BeSameAs(image); 1268dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1269dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1314theoryData.Add(format, autoConvert, null, format == DataFormats.FileDrop, format == DataFormats.Bitmap); 1315theoryData.Add(format, autoConvert, "input", format == DataFormats.FileDrop, format == DataFormats.Bitmap); 1413dataObject.GetData(DataFormats.Bitmap, autoConvert: true).Should().BeSameAs(image); 1414dataObject.GetData(DataFormats.Bitmap, autoConvert: false).Should().BeSameAs(image); 1421dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1422dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1594dataObject.GetData(DataFormats.Bitmap, autoConvert: true).Should().BeSameAs(image); 1595dataObject.GetData(DataFormats.Bitmap, autoConvert: false).Should().BeSameAs(image); 1602dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: true).Should().BeTrue(); 1603dataObject.GetDataPresent(DataFormats.Bitmap, autoConvert: false).Should().BeTrue(); 1620.Setup(o => o.SetData(DataFormats.Bitmap, true, image)) 1623mockDataObject.Verify(o => o.SetData(DataFormats.Bitmap, true, image), Times.Once()); 1633.Setup(o => o.SetData(DataFormats.Bitmap, true, image)) 1637mockDataObject.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)
51DataFormats.Bitmap,