Hi 赵召,
I just answered you in another thread, take a look at this blog:
http://blogs.msdn.com/b/lighthouse/archive/2013/10/18/capturing-snapshot-in-windows-8-1-store-app.aspx
some code you could use:
function captureToImage() {
var webviewControl = document.getElementById("webview");
Windows.Storage.ApplicationData.current.localFolder.createFileAsync("test.png", Windows.Storage.CreationCollisionOption.replaceExisting).then(function (file) {
file.openAsync(Windows.Storage.FileAccessMode.readWrite).then(function (stream) {
var captureOperation = webviewControl.capturePreviewToBlobAsync();
captureOperation.oncomplete = function (completeEvent) {
var inputStream = completeEvent.target.result.msDetachStream();
Windows.Storage.Streams.RandomAccessStream.copyAsync(inputStream, stream).then(function () {
stream.flushAsync().done(function () {
inputStream.close();
stream.close();
});
});
};
captureOperation.start();
});
});
}
Hope it will help you.
Best Regards,
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.