如果我想在 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 分钟。所以,不可能每分钟都通过对话拍照。我可以照原样拍摄照片程序吗?