DataFormats Class
Provides a set of predefined data format names that can be used to identify data formats available in the clipboard or drag-and-drop operations.
Assembly: PresentationCore (in PresentationCore.dll)
The DataFormats type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | GetDataFormat(Int32) | Returns a DataFormat object that defines a name and numeric ID for the specified data format. The desired data format is specified by numeric ID. |
![]() ![]() | GetDataFormat(String) | Returns a DataFormat object that defines a name and numeric ID for the specified data format. The desired data format is specified by name (a string). |
| Name | Description | |
|---|---|---|
![]() ![]() | Bitmap | Specifies a Microsoft Windows bitmap data format. |
![]() ![]() | CommaSeparatedValue | Specifies a comma-separated value (CSV) data format. |
![]() ![]() | Dib | Specifies the device-independent bitmap (DIB) data format. |
![]() ![]() | Dif | Specifies the Windows Data Interchange Format (DIF) data format. |
![]() ![]() | EnhancedMetafile | Specifies the Windows enhanced metafile format. |
![]() ![]() | FileDrop | Specifies the Windows file drop format. |
![]() ![]() | Html | Specifies the HTML data format. |
![]() ![]() | Locale | Specifies the Windows locale (culture) data format. |
![]() ![]() | MetafilePicture | Specifies the Windows metafile picture data format. |
![]() ![]() | OemText | Specifies the standard Windows OEM text data format. |
![]() ![]() | Palette | Specifies the Windows palette data format. |
![]() ![]() | PenData | Specifies the Windows pen data format. |
![]() ![]() | Riff | Specifies the Resource Interchange File Format (RIFF) audio data format. |
![]() ![]() | Rtf | Specifies the Rich Text Format (RTF) data format. |
![]() ![]() | Serializable | Specifies a data format that encapsulates any type of serializable data objects. |
![]() ![]() | StringFormat | Specifies the common language runtime (CLR) string class data format. |
![]() ![]() | SymbolicLink | Specifies the Windows symbolic link data format. |
![]() ![]() | Text | Specifies the ANSI text data format. |
![]() ![]() | Tiff | Specifies the Tagged Image File Format (TIFF) data format. |
![]() ![]() | UnicodeText | Specifies the Unicode text data format. |
![]() ![]() | WaveAudio | Specifies the wave audio data format. |
![]() ![]() | Xaml | Specifies the Extensible Application Markup Language (XAML) data format. |
![]() ![]() | XamlPackage | Specifies the Extensible Application Markup Language (XAML) package data format. |
The DataObject class and other classes that implement the IDataObject interface use the static formats defined by DataFormats to describe each data format that is stored in a data object. Data objects are typically used for transferring data to and from the system clipboard, and in drag-and-drop operations.
The following table lists the values of the static data format fields provided by DataFormats. These field values are provided for informational purposes only; in general, code should always refer to the appropriate field, rather than hard-coded strings.
Field | Field Value | Description |
|---|---|---|
"Bitmap" | Specifies a Microsoft Windows bitmap data format. | |
"CSV" | Specifies a comma-separated value (CSV) data format. | |
"DeviceIndependentBitmap" | Specifies the device-independent bitmap (DIB) data format. | |
"DataInterchangeFormat" | Specifies the Windows Data Interchange Format (DIF) data format. | |
"EnhancedMetafile" | Specifies the Windows enhanced metafile format. | |
"FileDrop" | Specifies the Windows file drop format. | |
"HTML Format" | Specifies the HTML data format. | |
"Locale" | Specifies the Windows locale (culture) data format. | |
"MetaFilePict" | Specifies the Windows metafile picture data format. | |
"OEMText" | Specifies the standard Windows OEM text data format. | |
"Palette" | Specifies the Windows palette data format. | |
"PenData" | Specifies the Windows pen data format. | |
"RiffAudio" | Specifies the Resource Interchange File Format (RIFF) audio data format. | |
"Rich Text Format" | Specifies the Rich Text Format (RTF) data format. | |
"PersistentObject" | Specifies a data format that encapsulates any type of serializable data objects. | |
"System.String" | Specifies the common language runtime (CLR) string class data format. | |
"SymbolicLink" | Specifies the Windows symbolic link data format. | |
"Text" | Specifies the ANSI text data format. | |
"TaggedImageFileFormat" | Specifies the Tagged Image File Format (TIFF) data format. | |
"UnicodeText" | Specifies the Unicode text data format. | |
"WaveAudio" | Specifies the wave audio data format. | |
"Xaml" | Specifies the Extensible Application Markup Language (XAML) data format. | |
"XamlPackage" | Specifies the Extensible Application Markup Language (XAML) package data format. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
