O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CameraCaptureUI

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required