Reputation: 963
Is there any way to take a screenshot on Windows Phone 8 (or 7.1) programmatically?
For Windows Phone 7/7.1, there is at least an inofficial solution: http://forum.xda-developers.com/showthread.php?t=1006331
But I have no idea what to do to get this functionality in my own app.
Also, I would intend to take screenshots not only of my own app but also of other apps (e.g. timer triggered).
Upvotes: 2
Views: 2902
Reputation: 3162
Upvotes: 0
Reputation: 133
You could easily do this on emulator, run your app, and then click double arrow button which pops up another window, and then go to screenshot tab and capture. Or if you have device press Widnows Home and Power simmontaniously.
Upvotes: 0
Reputation: 60
you can take the screen shot in your windows phone 8, by the simultaneous press of the volume button and the window key. or else try this code
var bmp = new WriteableBitmap(lbxDays, new TranslateTransform());
var width = (int)bmp.PixelWidth;
var height = (int)bmp.PixelHeight;
bmp.Render(lbxDays, new TranslateTransform());
using (var ms = new MemoryStream())
{
bmp.SaveJpeg(ms, width, height, 0, 100);
ms.Seek(0, System.IO.SeekOrigin.Begin);
var lib = new MediaLibrary();
var dateStr = DateTime.Now.Ticks;
var picture = lib.SavePicture(string.Format("screenshot"+dateStr+".jpg"), ms);
var task = new ShareMediaTask();
task.FilePath = picture.GetPath();
task.Show();
}
Upvotes: 3