Class Clipboard
Provides cut, copy, and paste support for the OS clipboard.
[Obsolete("Use IApplication.Clipboard instead. The static Clipboard class will be removed in a future release.")]
public static class Clipboard
- Inheritance
-
Clipboard
- Inherited Members
Remarks
DEPRECATED: This static class is obsolete. Use Clipboard instead.
On Windows, the Clipboard class uses the Windows Clipboard APIs via P/Invoke.
On Linux, when not running under Windows Subsystem for Linux (WSL), the Clipboard class uses the xclip command line tool. If xclip is not installed, the clipboard will not work.
On Linux, when running under Windows Subsystem for Linux (WSL), the Clipboard class launches Windows' powershell.exe via WSL interop and uses the "Set-Clipboard" and "Get-Clipboard" Powershell CmdLets.
On the Mac, the Clipboard class uses the MacO OS X pbcopy and pbpaste command line tools and the Mac clipboard APIs vai P/Invoke.
Properties
- Contents
Gets (copies from) or sets (pastes to) the contents of the OS clipboard.
- IsSupported
Returns true if the environmental dependencies are in place to interact with the OS clipboard.
Methods
- TryGetClipboardData(out string)
Gets the OS clipboard data if possible.
- TrySetClipboardData(string)
Sets the OS clipboard data if possible.