Back to API Reference
Struct
ClipboardItem
sealed
A single (format, payload) pair on the clipboard. Multi-format writes pass a list of items in one atomic IClipboardProvider.SetItems call; the OS stores them as a single clipboard write whose richest available format is selected by the consumer on paste.
Remarks
Data holds the format's bytes. For text formats the bytes are UTF-8 (so a consumer can Encoding.UTF8.GetString(item.Data)); for binary formats (P2 image, RTFD) it is the format's native byte representation.
public ClipboardFormat Format{ get }Format identifier for Data.
[ctor]public ClipboardItem(ClipboardFormat format, byte[] data)Retains the supplied buffer; null represents an empty payload.
[ctor]public ClipboardItem(ClipboardFormat format, string text)Creates a text payload, replacing unpaired surrogates as UTF-8 encoding does; its byte buffer is allocated on the first access to Data.
