TryGetInProcessDataAsync Method
Retrieves the exact instance of a IAsyncDataTransfer previously placed on the clipboard by SetDataAsync(IAsyncDataTransfer), if any.
Definition
Namespace: Avalonia.Input.Platform
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
Task<IAsyncDataTransfer?> TryGetInProcessDataAsync()
Function TryGetInProcessDataAsync As Task(Of IAsyncDataTransfer)
abstract TryGetInProcessDataAsync : unit -> Task<IAsyncDataTransfer>
Return Value
Task(IAsyncDataTransfer)
The data transfer object if present, null otherwise.
Remarks
This method cannot be used to retrieve a IAsyncDataTransfer set by another process.
This method is only supported on Windows, macOS and X11 platforms. Other platforms will always return null.
Contrary to TryGetDataAsync(), the returned IAsyncDataTransfer must NOT be disposed by the caller since it's still owned by the clipboard.