MediaCapture.CapturePhotoToStorageFileAsync(ImageEncodingProperties, IStorageFile) Method

Definition

Captures a photo to a storage file.

public:
 virtual IAsyncAction ^ CapturePhotoToStorageFileAsync(ImageEncodingProperties ^ type, IStorageFile ^ file) = CapturePhotoToStorageFileAsync;
IAsyncAction CapturePhotoToStorageFileAsync(ImageEncodingProperties const & type, IStorageFile const & file);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction CapturePhotoToStorageFileAsync(ImageEncodingProperties type, IStorageFile file);
function capturePhotoToStorageFileAsync(type, file)
Public Function CapturePhotoToStorageFileAsync (type As ImageEncodingProperties, file As IStorageFile) As IAsyncAction

Parameters

type
ImageEncodingProperties

The encoding properties for the output image.

file
IStorageFile

The storage file where the image is saved.

Returns

IAsyncAction

Returns an IAsyncAction object that is used to control the asynchronous operation.

Attributes

Windows 10 requirements

App capabilities
backgroundMediaRecording microphone webcam

Remarks

For how-to guidance on capturing a photo to a storage file, see Basic Basic photo, video, and audio capture with MediaCapture.

Applies to