Skip to main content

TryGetBitmap Method

Returns a bitmap, if available, from a IDataTransferItem instance.

Definition​

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

public static Bitmap? TryGetBitmap(
this IDataTransferItem dataTransferItem
)

Parameters​

  IDataTransferItem
The IDataTransferItem instance.

Return Value​

Bitmap
A Bitmap, 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 IDataTransferItem. 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​

DataTransferItemExtensions Class
Avalonia.Input Namespace
Bitmap