Skip to content

A cross platform package to copy text to and from the clipboard.

License

Notifications You must be signed in to change notification settings

CopyText/TextCopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TextCopy

Build status Build status NuGet Status

A cross platform package to copy text to and from the clipboard.

Support is available via a Tidelift Subscription.

Contents

NuGet package

https://nuget.org/packages/TextCopy/

Usage

SetTextAsync

await ClipboardService.SetTextAsync("Text to place in clipboard");

snippet source | anchor

SetText

ClipboardService.SetText("Text to place in clipboard");

snippet source | anchor

GetTextAsync

var text = await ClipboardService.GetTextAsync();

snippet source | anchor

GetText

var text = ClipboardService.GetText();

snippet source | anchor

Instance API

In adition to the above static API, there is an instance API exposed:

var clipboard = new Clipboard();
clipboard.SetText("Text to place in clipboard");

snippet source | anchor

Supported on

  • 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

Notes on Linux

Linux uses xclip to access the clipboard. As such it needs to be installed and callable.

Security contact information

To report a security vulnerability, use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Icon

Clone designed by Wes Breazell from The Noun Project.

About

A cross platform package to copy text to and from the clipboard.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published