콘텐츠로 이동

IDataObject interface

이 콘텐츠는 아직 번역되지 않았습니다.

Represents drag-and-drop or clipboard data in a format-agnostic way.

public interface IDataObject
name description
Formats { get; } Gets the available format identifiers.
Contains(…) Returns true when the data object contains the specified format.
GetData(…) Returns the raw data for the specified format, or null when not present.
TryGetData<T>(…) Attempts to retrieve strongly typed data for the specified format. (2 methods)

Data from another application lists the standard formats it can be read as, followed by every format the source offered under the platform’s own name (see FromPlatformName). Values are read when requested, and only while the drag lasts: a value not read before the drag ends is no longer available.