Plugin.Screenshot
0.0.1
Requires NuGet 2.8.1 or higher.
dotnet add package Plugin.Screenshot --version 0.0.1
NuGet\Install-Package Plugin.Screenshot -Version 0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.Screenshot" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Plugin.Screenshot --version 0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Plugin.Screenshot, 0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Plugin.Screenshot as a Cake Addin
#addin nuget:?package=Plugin.Screenshot&version=0.0.1
// Install Plugin.Screenshot as a Cake Tool
#tool nuget:?package=Plugin.Screenshot&version=0.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Screenshot Plugin for Xamarin
Simple way to take a screenshot in Xamarin.iOS and Xamarin.Android
Supports
- Xamarin.iOS (Unified)
- Xamarin.Android
API Usage
Call CrossScreenshot.Current from any project or PCL to gain access to APIs.
iOS
void TakeScreenshot()
{
var documentsDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
var screenshotPath = System.IO.Path.Combine(documentsDirectory, "screenshot.jpg");
if (CrossScreenshot.Current.TakeScreenshot(screenshotPath, null))
{
// Set UIImageView to show the screenshot
screenshotImage.Image = new UIImage(screenshotPath);
}
}
Android
void TakeScreenshot()
{
var screenshotPath = Android.OS.Environment.ExternalStorageDirectory.ToString() + "/screenshot.jpg";
if (CrossScreenshot.Current.TakeScreenshot(screenshotPath, this))
{
// Set ImageView to show the screenshot
var screenshotUri = Android.Net.Uri.FromFile(new Java.IO.File(screenshotPath));
screenshotImage.SetImageURI(null);
screenshotImage.SetImageURI(screenshotUri);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
MonoAndroid | monoandroid10 is compatible. |
Xamarin.iOS | xamarinios10 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.0.1 | 1,538 | 5/31/2018 |