Skip to main content

IClipboard Interface

Not client implementable.

Note: This interface is not client implementable. You need to enable PrivateApi if you want to implement this interface.

Represents the system clipboard.

Definition

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

[NotClientImplementableAttribute]
public interface IClipboard
View Source

Methods

ClearAsync()Clears any data from the system clipboard.
FlushAsync()Permanently adds the data that is on the Clipboard so that it is available after the data's original application closes.
GetDataAsync(String)Retrieves data in a specified format from the Clipboard.
Obsolete.
GetFormatsAsync()Get list of available Clipboard format.
Obsolete.
GetTextAsync()Returns a string containing the text data on the clipboard.
Obsolete.
SetDataAsync(IAsyncDataTransfer)Places a data object on the clipboard. The data object is responsible for providing supported formats and data upon request.
SetDataObjectAsync(IDataObject)Places a specified non-persistent data object on the system Clipboard.
Obsolete.
SetTextAsync(String)Places a text on the clipboard.
TryGetDataAsync()Retrieves data from the clipboard.
TryGetInProcessDataAsync()Retrieves the exact instance of a IAsyncDataTransfer previously placed on the clipboard by SetDataAsync(IAsyncDataTransfer), if any.
TryGetInProcessDataObjectAsync()If clipboard contains the IDataObject that was set by a previous call to SetDataObjectAsync(IDataObject), return said IDataObject instance. Otherwise, return null. Note that not every platform supports that method, on unsupported platforms this method will always return null
Obsolete.

Extension Methods

GetDataFormatsAsync()Gets a list containing the formats currently available from the clipboard.
(Defined by ClipboardExtensions)
SetFileAsync(IStorageItem)Places a file on the clipboard.
(Defined by ClipboardExtensions)
SetFilesAsync(IEnumerable(IStorageItem))Places a list of files on the clipboard.
(Defined by ClipboardExtensions)
SetTextAsync(String)Places a text on the clipboard.
(Defined by ClipboardExtensions)
SetValueAsync(T)(DataFormat(T), T)Places a single value on the clipboard in the specified format.
(Defined by ClipboardExtensions)
SetValuesAsync(T)(DataFormat(T), IEnumerable(T))Places multiple values on the clipboard in the specified format.
(Defined by ClipboardExtensions)
TryGetFileAsync()Returns a file, if available, from the clipboard.
(Defined by ClipboardExtensions)
TryGetFilesAsync()Returns a list of files, if available, from the clipboard.
(Defined by ClipboardExtensions)
TryGetTextAsync()Returns a text, if available, from the clipboard.
(Defined by ClipboardExtensions)
TryGetValueAsync(T)(DataFormat(T))Tries to get a value for a given format from the clipboard.
(Defined by ClipboardExtensions)
TryGetValuesAsync(T)(DataFormat(T))Tries to get multiple values for a given format from the clipboard.
(Defined by ClipboardExtensions)

See Also

Reference

Avalonia.Input.Platform Namespace