Sdílet prostřednictvím


MediaCapture.CapturePhotoToStorageFileAsync Method

Definition

Captures a photo to a storage file.

public:
 virtual IAsyncAction ^ CapturePhotoToStorageFileAsync(ImageEncodingProperties ^ type, IStorageFile ^ file) = CapturePhotoToStorageFileAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
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

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

Attributes

Windows 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