A cross platform package to copy text to and from the clipboard.
Support is available via a Tidelift Subscription.
https://nuget.org/packages/TextCopy/
await ClipboardService.SetTextAsync("Text to place in clipboard");
ClipboardService.SetText("Text to place in clipboard");
var text = await ClipboardService.GetTextAsync();
var text = ClipboardService.GetText();
In adition to the above static API, there is an instance API exposed:
var clipboard = new Clipboard();
clipboard.SetText("Text to place in clipboard");
- Windows with .NET Framework 4.6.1 and up
- Windows with .NET Core 2.0 and up
- Windows with Mono 5.0 and up
- OSX with .NET Core 2.0 and up
- OSX with Mono 5.20.1 and up
- Linux with .NET Core 2.0 and up
- Linux with Mono 5.20.1 and up
- Xamarin.Android 9.0 and up
- Xamarin.iOS 10.0 and up
- Universal Windows Platform version 10.0.16299 and up
Linux uses xclip to access the clipboard. As such it needs to be installed and callable.
To report a security vulnerability, use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Clone designed by Wes Breazell from The Noun Project.