A simple Screenshot plugin for Xamarin and Windows to get and save screenshot in yours apps.
- NuGet: Xam.Plugin.Screenshot
- Github Packages Registry: Xam.Plugin.Screenshot
Platform | Version |
---|---|
Xamarin.iOS | iOS 8+ |
Xamarin.Android | API 14+ |
Windows 10 UWP | 10+ |
using Plugin.Screenshot;
...
var stream = new MemoryStream(await CrossScreenshot.Current.CaptureAsync());
yourImage.Source = ImageSource.FromStream(() => stream);
using Plugin.Screenshot;
...
string path = await CrossScreenshot.Current.CaptureAndSaveAsync();
Add in your Info.plist
<key>NSPhotoLibraryUsageDescription</key>
<string>This application needs your permission to save photos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This application needs your permission to save photos.</string>
Created By: @Wilson Vargas
- Twitter: @Wilson_VargasM
- Blog: wilsonvargas.net
The MIT License (MIT), see LICENSE file.