How should you complete the method?

DRAG DROP
You are creating a Universal Windows Platform (UWP) app that takes pictures.
You want to use the camera’s built-in interface for taking the pictures.
You need to capture an image from the device’s built-in camera.
How should you complete the method? To answer, drag the appropriate code segments to the correct location or locations. Each code segments may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

DRAG DROP
You are creating a Universal Windows Platform (UWP) app that takes pictures.
You want to use the camera’s built-in interface for taking the pictures.
You need to capture an image from the device’s built-in camera.
How should you complete the method? To answer, drag the appropriate code segments to the correct location or locations. Each code segments may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:

Answer:

Explanation:
Box 1: CameraCaptureUI
Box 2: CameraCaptureUI
Example: Using Windows.Media.Capture.CameraCaptureUI API to capture a photo
CameraCaptureUI dialog = new CameraCaptureUI();
Size aspectRatio = new Size(16, 9);
dialog.PhotoSettings.CroppedAspectRatio = aspectRatio;
StorageFile file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Photo);
https://docs.microsoft.com/en-us/uwp/api/windows.media.capture.cameracaptureui



Leave a Reply 0

Your email address will not be published. Required fields are marked *