26 references to GetFormat
System.Windows.Forms (5)
System\Windows\Forms\OLE\DataObject.Composition.NativeToWinFormsAdapter.cs (4)
302cfFormat = (ushort)DataFormats.GetFormat(format).Id, 362cfFormat = (ushort)DataFormats.GetFormat(format).Id, 422cfFormat = (ushort)DataFormats.GetFormat(format).Id, 657cfFormat = (ushort)(DataFormats.GetFormat(format).Id),
System\Windows\Forms\OLE\DataObject.FormatEnumerator.cs (1)
46cfFormat = (short)(ushort)DataFormats.GetFormat(format).Id,
System.Windows.Forms.Tests (21)
System\Windows\Forms\ClipboardTests.cs (1)
1021cfFormat = (short)DataFormats.GetFormat("testFormat").Id,
System\Windows\Forms\DataFormatsTests.cs (9)
67DataFormats.Format result = DataFormats.GetFormat(format); 68Assert.Same(result, DataFormats.GetFormat(format.ToLowerInvariant())); 73Assert.Same(result, DataFormats.GetFormat(format)); 90DataFormats.Format result = DataFormats.GetFormat(format); 91Assert.Same(result, DataFormats.GetFormat(format)); 92Assert.Same(result, DataFormats.GetFormat(format.ToLowerInvariant())); 108Assert.Throws<ArgumentException>("format", () => DataFormats.GetFormat("")); 109Assert.Throws<ArgumentNullException>("format", () => DataFormats.GetFormat(null)); 121Assert.Throws<Win32Exception>(() => DataFormats.GetFormat(format));
System\Windows\Forms\DataObjectTests.cs (6)
2084result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat(format1).Id))); 2187result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat("Format1").Id))); 2197result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat("Format2").Id))); 2274result[0].cfFormat.Should().Be(unchecked((short)(ushort)(DataFormats.GetFormat(format1).Id))); 2371{ TextDataFormat.Rtf, (short)DataFormats.GetFormat(DataFormats.Rtf).Id }, 2372{ TextDataFormat.Html, (short)DataFormats.GetFormat(DataFormats.Html).Id }
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (3)
46richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 58richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Text)); 79richTextBox1.Paste(DataFormats.GetFormat(DataFormats.Rtf));
System\Windows\Forms\RichTextBoxTests.cs (2)
7841yield return new object[] { DataFormats.GetFormat(DataFormats.Palette), false }; 7889Assert.Equal(expected, control.CanPaste(DataFormats.GetFormat(DataFormats.Text)));