The CameraCaptureUI class enables you to launch an experience similar to the built-in Camera app (in a more limited mode and directly inside your app) in order to easily capture a photo or video. For the user, the result is like choosing the Camera app inside the Windows file picker, except it’s full-screen and there’s a back button on the top left instead of a cancel button on the bottom right.

Capturing a Photo

Assuming you have an Image named image on your Page:

<Image Name="image"/>

the following code-behind launches the camera UI in photo-taking mode:

async Task CapturePhoto(){  CameraCaptureUI camera = new CameraCaptureUI();  // Get a JPEG image from the camera   StorageFile file = await

Get XAML Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.