Cross Platform Clipboard access for Xamarin
MIT License
Simple cross platform plugin to read and write to the clipboard.
Call Plugin.Clipboard.CrossClipboard.Current from any project or .NET Standard library to gain access to APIs.
using Plugin.Clipboard;
...
//To set the clipboard
CrossClipboard.Current.SetText("my clipboard text");
//To read the clipboard
string clipboardText = await CrossClipboard.Current.GetTextAsync();
//Create mock with LightMock (https://github.com/seesharper/LightMock)
var mockClipboardContext = new MockContext<IClipboard>();
var mockClipboard = new CrossClipboardMock(mockClipboardContext);
CrossClipboard.Current = mockClipboard;