The camera capture task is a chooser that is used to launch the built-in Camera app. If the user completes the task by taking and confirming a photo, the
Completed event is raised and the event handler receives a
PhotoResult object, which exposes a stream containing the image data.
CameraCaptureTask should be defined as a field in your class, like so:
readonly CameraCaptureTask cameraCaptureTask = new CameraCaptureTask();
Subscribe to the
CameraCaptureTask.Completed event within your class constructor, as shown: