Name
DataFormats
Synopsis
The Clipboard and drag-and-drop operations require
you to encapsulate data into an IDataObject
derived class. In part, this demands that you specify the
Format of the data encapsulated, represented as
string. There are several standard formats that the system
understands, such as Dib (device-independent
bitmap) and UnicodeText, and static properties are
provided that return an appropriate format string to identify them.
For more complex situations, there are also two static
GetFormat() methods. Both return a
Format object, mapping a format identification
string to a clipboard format ID (an integer). The string version also
registers the specified clipboard format with the OS if it
hasn’t been registered previously.
public class DataFormats { // Public Static Fields public static readonly string Bitmap; // =Bitmap public static readonly string CommaSeparatedValue; // =Csv public static readonly string Dib; // =DeviceIndependentBitmap public static readonly string Dif; // =DataInterchangeFormat public static readonly string EnhancedMetafile; // =EnhancedMetafile public static readonly string FileDrop; // =FileDrop public static readonly string Html; // =HTML Format public static readonly string Locale; // =Locale public static readonly string MetafilePict; // =MetaFilePict public static readonly string OemText; // =OEMText public static readonly string Palette; // =Palette public static readonly string PenData; // =PenData public static readonly string Riff ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access