如果我想在WinRT中拍照,我需要调用此代码:
var ui = new CameraCaptureUI();
ui.PhotoSettings.CroppedAspectRatio = new Size(4, 3);
var file = await ui.CaptureFileAsync(CameraCaptureUIMode.Photo);
if (file != null)
{
IRandomAccessStream fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read);
var bitmap = new BitmapImage();
bitmap.SetSource(fileStream);
Photo.Source = bitmap;
}
但是,我想自动拍照,例如。每1分钟一次。因此,每分钟都不可能通过对话拍照。我可以拍摄照片吗?
答案 0 :(得分:0)