Skip to main content

TryGetFiles Method

Returns a list of files, if available, from a IDataTransfer instance.

Definition

Namespace: Avalonia.Input
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public static IStorageItem[]? TryGetFiles(
this IDataTransfer dataTransfer
)

Parameters

  IDataTransfer
The data transfer instance.

Return Value

IStorageItem[]
An array of IStorageItem (files or folders), 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 IDataTransfer. 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

DataTransferExtensions Class
Avalonia.Input Namespace
File