Sample code. It’s not tested, so let me know if there are any issues:
Basically a wrapper around CaptureCameraTask with some image resize filling.
Usage:
private void ConfirmMarkerPicture_Click(object sender, RoutedEventArgs e)
{
CameraTask task = new CameraTask();
task.TakePicture(CameraTask_TakenPicture, true);
}
private void CameraTask_TakenPicture(BitmapImage image)
{
_imgMarker.Source = image;
}
… where _imgMarker is type Image.
There are also Resize Width and Height properties which can be set prior to TakePicture call.
Happy coding .
No comments:
Post a Comment