Skip to main content
CameraCaptureUI.CaptureFileAsync | captureFileAsync method

Launches the CameraCaptureUI user interface.

Syntax


cameraCaptureUI.captureFileAsync(mode).done( /* Your success and error handlers */ );

public IAsyncOperation<StorageFile> CaptureFileAsync(
  CameraCaptureUIMode mode
)

Public Function CaptureFileAsync(
  mode As CameraCaptureUIMode 
) As IAsyncOperation(Of StorageFile)

public:
IAsyncOperation<StorageFile>^ CaptureFileAsync(
  CameraCaptureUIMode mode
)

Parameters

mode

Type: CameraCaptureUIMode

Specifies whether the user interface that will be shown allows the user to capture a photo, capture a video, or capture both photos and videos.

Return value

Type: IAsyncOperation<StorageFile>

When this operation completes, a StorageFile object is returned.

Remarks

Call CaptureFileAsync to launch the UI. The user has control over when to start the capture. When the asynchronous operation completes, a StorageFile object is returned.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0 [for Xbox, see UWP features that aren't yet supported on Xbox]

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Media.Capture
Windows::Media::Capture [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Capabilities

webcam
microphone

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.Media.Capture
Windows::Media::Capture [C++]

Metadata

Windows.winmd

Capabilities

webcam
microphone

See also

CameraCaptureUI