ClipboardExtensions Class
Definition
Contains extension methods related to Avalonia.Input.Platform.IClipboard.
public class ClipboardExtensions
Methods
| Name | Description |
|---|---|
| GetDataFormatsAsync | Gets a list containing the formats currently available from the clipboard. |
| SetBitmapAsync | Places a bitmap on the clipboard. |
| SetFileAsync | Places a file on the clipboard. |
| SetFilesAsync | No summary available. |
| SetTextAsync | Places a text on the clipboard. |
| SetValueAsync | No summary available. |
| SetValuesAsync | No summary available. |
| TryGetBitmapAsync | Returns a bitmap, if available, from the clipboard. |
| TryGetFileAsync | Returns a file, if available, from the clipboard. |
| TryGetFilesAsync | Returns a list of files, if available, from the clipboard. |
| TryGetTextAsync | Returns a text, if available, from the clipboard. |
| TryGetValueAsync | No summary available. |
| TryGetValuesAsync | No summary available. |
GetDataFormatsAsync Method
Gets a list containing the formats currently available from the clipboard.
public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Input.DataFormat>> GetDataFormatsAsync(Avalonia.Input.Platform.IClipboard clipboard)
Parameters
clipboard Avalonia.Input.Platform.IClipboard
Returns
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Avalonia.Input.DataFormat>>
A list of formats. It can be empty if the clipboard is empty.
SetBitmapAsync Method
Places a bitmap on the clipboard.
public System.Threading.Tasks.Task SetBitmapAsync(Avalonia.Input.Platform.IClipboard clipboard, Avalonia.Media.Imaging.Bitmap bitmap)
Parameters
clipboard Avalonia.Input.Platform.IClipboard
The clipboard instance.
bitmap Avalonia.Media.Imaging.Bitmap
The bitmap to place on the clipboard.
Returns
System.Threading.Tasks.Task
Remarks
By calling this method, the clipboard will get cleared of any possible previous data.
If bitmap is null, nothing will get placed on the clipboard and this method
will be equivalent to Avalonia.Input.Platform.IClipboard.ClearAsync.
See also
SetFileAsync Method
Places a file on the clipboard.
public System.Threading.Tasks.Task SetFileAsync(Avalonia.Input.Platform.IClipboard clipboard, Avalonia.Platform.Storage.IStorageItem file)
Parameters
clipboard Avalonia.Input.Platform.IClipboard
The clipboard instance.
file Avalonia.Platform.Storage.IStorageItem
The file to place on the clipboard.
Returns
System.Threading.Tasks.Task
Remarks
By calling this method, the clipboard will get cleared of any possible previous data.
If file is null, nothing will get placed on the clipboard and this method
will be equivalent to Avalonia.Input.Platform.IClipboard.ClearAsync.
See also
SetFilesAsync Method
public System.Threading.Tasks.Task SetFilesAsync(Avalonia.Input.Platform.IClipboard clipboard, System.Collections.Generic.IEnumerable<Avalonia.Platform.Storage.IStorageItem> files)