TryGetTextAsync Method
Returns a text, if available, from a IAsyncDataTransferItem instance.
Definition
Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Task<string?> TryGetTextAsync(
this IAsyncDataTransferItem dataTransferItem
)
<ExtensionAttribute>
Public Shared Function TryGetTextAsync (
dataTransferItem As IAsyncDataTransferItem
) As Task(Of String)
[<ExtensionAttribute>]
static member TryGetTextAsync :
dataTransferItem : IAsyncDataTransferItem -> Task<string>
Parameters
- IAsyncDataTransferItem
- The data transfer instance.
Return Value
Task(String)
A string, or null if the format isn't available.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncDataTransferItem. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also
Reference
AsyncDataTransferItemExtensions Class
Avalonia.Input Namespace
Text