On Windows Phone 8.1, I am using the Caliburn.Micro view-model-first approach, but as the view model cannot have any knowledge of the view, I cannot see how I can bind a MediaCa
Adding to Hawlett's answer, I had to do a little bit more to get the camera displaying correctly. I have changed ConfigureMedia() to be:
private async void ConfigureMedia()
{
_deviceInformationCollection = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);
await MediaCapture.InitializeAsync(new MediaCaptureInitializationSettings
{
VideoDeviceId = _deviceInformationCollection[_deviceInformationCollection.Count - 1].Id
// The rear-facing camera is the last in the list
});
MediaCapture.VideoDeviceController.PrimaryUse = CaptureUse.Photo;
MediaCapture.SetPreviewRotation(VideoRotation.Clockwise90Degrees);
CaptureElement.Source = MediaCapture;
CaptureElement.Stretch = Stretch.UniformToFill;
await MediaCapture.StartPreviewAsync();
}