TryGetValuesAsync<T> Method
Tries to get multiple values for a given format from the clipboard.
Definition
Namespace: Avalonia.Input.Platform
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static Task<T[]?> TryGetValuesAsync<T>(
this IClipboard clipboard,
DataFormat<T> format
)
where T : class
<ExtensionAttribute>
Public Shared Function TryGetValuesAsync(Of T As Class) (
clipboard As IClipboard,
format As DataFormat(Of T)
) As Task(Of T())
[<ExtensionAttribute>]
static member TryGetValuesAsync :
clipboard : IClipboard *
format : DataFormat<'T> -> Task<'T[]> when 'T : not struct
Parameters
- IClipboard
- The IClipboard instance.
- DataFormat(T)
- The format to retrieve.
Type Parameters
Return Value
Task(T[])
A list of values for format, or null if the format is not supported.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IClipboard. 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).