DataTransferItem Class
An item of a drag data store (https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitem-interface).
public sealed class DataTransferItemProperties
| Name | Description |
|---|---|
| Kind | https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-kind |
| Type | https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-type |
Kind
DataTransfer.cshttps://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-kind
public string Kind { get; }Property value
See also
Type
DataTransfer.cshttps://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-type
public string Type { get; }Property value
See also
Methods
| Name | Description |
|---|---|
| GetAsFile() | https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-getasfile |
| GetAsFileSystemHandle() | Returns a handle to a file or a directory dropped from outside the user agent (https://wicg.github.io/file-system-access/#dom-datatransferitem-getasfilesystemhandle): a handle to a copy of the dropped files, that the page can read and change (the files of the disk do not change). The task completes with null for the other items, and while the drag data store is protected (before the drop). |
| GetAsString(FunctionStringCallback?) | https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-getasstring: the callback is invoked from a task. |
| WebkitGetAsEntry() | Returns the entry of a file item (https://wicg.github.io/entries-api/#dom-datatransferitem-webkitgetasentry): a file or a directory dropped from outside the user agent (read the files of a directory with FileSystemDirectoryEntry.CreateReader), or a file added by a script. The root directory of its file system contains the files of the drag data store. Null for the text items, and while the drag data store is protected (before the drop). |
GetAsFile()
DataTransfer.cshttps://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-getasfile
public File? GetAsFile()GetAsFileSystemHandle()
DataTransfer.csReturns a handle to a file or a directory dropped from outside the user agent (https://wicg.github.io/file-system-access/#dom-datatransferitem-getasfilesystemhandle): a handle to a copy of the dropped files, that the page can read and change (the files of the disk do not change). The task completes with null for the other items, and while the drag data store is protected (before the drop).
public Task<FileSystemHandle?> GetAsFileSystemHandle()GetAsString(FunctionStringCallback?)
DataTransfer.cshttps://html.spec.whatwg.org/multipage/dnd.html#dom-datatransferitem-getasstring: the callback is invoked from a task.
public void GetAsString(FunctionStringCallback? callback)WebkitGetAsEntry()
DataTransfer.csReturns the entry of a file item (https://wicg.github.io/entries-api/#dom-datatransferitem-webkitgetasentry): a file or a directory dropped from outside the user agent (read the files of a directory with FileSystemDirectoryEntry.CreateReader), or a file added by a script. The root directory of its file system contains the files of the drag data store. Null for the text items, and while the drag data store is protected (before the drop).
public FileSystemEntry? WebkitGetAsEntry()