DataFormats 類別

定義

提供一組預先定義的資料格式名稱,這些名稱可用以識別剪貼簿或拖放作業中可用的資料格式。

public ref class DataFormats abstract sealed
public static class DataFormats
type DataFormats = class
Public Class DataFormats
繼承
DataFormats

備註

DataObject 作 介面的 IDataObject 類別和其他類別會使用 所 DataFormats 定義的靜態格式來描述儲存在資料物件中的每個資料格式。 資料物件通常用於將資料傳送至系統剪貼簿,以及在拖放作業中傳送資料。

下表列出 所提供的 DataFormats 靜態資料格式欄位值。 這些域值僅供參考之用;一般而言,程式碼應該一律參考適當的欄位,而不是硬式編碼字串。

欄位 欄位值 描述
Bitmap 「Bitmap」 指定 Microsoft Windows點陣圖資料格式。
CommaSeparatedValue 「CSV」 指定逗號分隔值 (CSV) 資料格式。
Dib 「DeviceIndependentBitmap」 指定與裝置無關的點陣圖 (DIB) 資料格式。
Dif 「DataInterchangeFormat」 指定 Windows 資料交換格式 (DIF) 資料格式。
EnhancedMetafile 「EnhancedMetafile」 指定 Windows 加強型中繼檔 (Metafile) 格式。
FileDrop 「FileDrop」 指定Windows檔案置放格式。
Html 「HTML 格式」 指定 HTML 資料格式。
Locale 「地區設定」 指定Windows地區設定 (文化特性) 資料格式。
MetafilePicture 「MetaFilePict」 指定Windows中繼檔圖片資料格式。
OemText 「OEMText」 指定標準Windows OEM 文字資料格式。
Palette 「Palette」 指定Windows調色盤資料格式。
PenData 「PenData」 指定Windows畫筆資料格式。
Riff 「RiffAudio」 指定資源交換檔案格式 (RIFF) 音訊資料格式。
Rtf 「RTF 格式」 指定 RTF (RTF) 資料格式。
Serializable 「PersistentObject」 指定用以封裝任何型別之可序列化資料物件的資料格式。
StringFormat "System.String" 指定 Common Language Runtime (CLR) 字串類別資料格式。
SymbolicLink 「SymbolicLink」 指定Windows符號連結資料格式。
Text "文字" 指定 ANSI 文字資料格式。
Tiff 「TaggedImageFileFormat」 指定標記影像檔案格式 (TIFF) 資料格式。
UnicodeText 「UnicodeText」 指定 Unicode 文字資料格式。
WaveAudio 「WaveAudio」 指定 Wave 音訊資料格式。
Xaml 「Xaml」 指定 XAML) 資料格式 (Extensible Application Markup Language。
XamlPackage 「XamlPackage」 指定 XAML) 封裝資料格式的可延伸應用程式標記語言 (。

欄位

Bitmap

指定 Microsoft Windows點陣圖資料格式。

CommaSeparatedValue

指定逗號分隔值 (CSV) 資料格式。

Dib

指定 DIB 資料格式。

Dif

指定 Windows 資料交換格式 (DIF) 資料格式。

EnhancedMetafile

指定 Windows 加強型中繼檔 (Metafile) 格式。

FileDrop

指定Windows檔案置放格式。

Html

指定 HTML 資料格式。

Locale

指定Windows地區設定 (文化特性) 資料格式。

MetafilePicture

指定Windows中繼檔圖片資料格式。

OemText

指定標準Windows OEM 文字資料格式。

Palette

指定Windows調色盤資料格式。

PenData

指定Windows畫筆資料格式。

Riff

指定資源交換檔案格式 (RIFF) 音訊資料格式。

Rtf

指定 RTF (RTF) 資料格式。

Serializable

指定用以封裝任何型別之可序列化資料物件的資料格式。

StringFormat

指定 Common Language Runtime (CLR) 字串類別資料格式。

SymbolicLink

指定Windows符號連結資料格式。

Text

指定 ANSI 文字資料格式。

Tiff

指定標記影像檔案格式 (TIFF) 資料格式。

UnicodeText

指定 Unicode 文字資料格式。

WaveAudio

指定 Wave 音訊資料格式。

Xaml

指定 XAML) 資料格式 (Extensible Application Markup Language。

XamlPackage

指定 XAML) 封裝資料格式的可延伸應用程式標記語言 (。

方法

GetDataFormat(Int32)

傳回 DataFormat 物件,這個物件會定義指定之資料格式的名稱與數值 ID。 所要的資料格式是由數值 ID 所指定。

GetDataFormat(String)

傳回 DataFormat 物件,這個物件會定義指定之資料格式的名稱與數值 ID。 所要的資料格式是由名稱 (字串) 所指定。

適用於