Esempio n. 1
0
        public async Task<Stream> TakePhoto(CameraCaptureUIPhotoFormat format)
        {
            captureUI.PhotoSettings.Format = format;
            StorageFile photoFile = await captureUI.CaptureFileAsync(CameraCaptureUIMode.Photo);

            if (photoFile == null)
            {
                await ShowMessage("Photo not taken.");
                return null;
            }

            return await ConvertToStream(photoFile);
        }
Esempio n. 2
0
        public async Task <Stream> TakePhoto(CameraCaptureUIPhotoFormat format)
        {
            captureUI.PhotoSettings.Format = format;
            StorageFile photoFile = await captureUI.CaptureFileAsync(CameraCaptureUIMode.Photo);

            if (photoFile == null)
            {
                await ShowMessage("Photo not taken.");

                return(null);
            }

            return(await ConvertToStream(photoFile));
        }