To crop selected image in the PhotoChooserTask all you have to do is set the pixel height and width of the image that you want to crop.
Let us see the steps to perform this task.
Create new project and once everything is ready write the following code:
- PhotoChooserTask open = new PhotoChooserTask();
- open.PixelHeight = 50;
- open.PixelWidth = 50;
- open.Completed += open_Completed;
- open.Show();
- void open_Completed(object sender, PhotoResult e)
- {
- BitmapImage image = new BitmapImage();
- image.SetSource(e.ChosenPhoto);
- cropedImage.Source = image;
- }

That’s it. Once you add the pixel width and height, you will get this nice crop tool, allowing users to select where the image should be cropped.
Now while choosing the picture let us see how to provide camera option.
Write the following code snippet.
- PhotoChooserTask open = new PhotoChooserTask();
- open.PixelHeight = 50;
- open.PixelWidth = 50;
- open.ShowCamera = true;
- open.Completed += open_Completed;
- open.Show();



Pradeep Kumar 0Posted Jul 26, 2016, 9:48 AM EDT
Thank you, will try this
Pradeep Kumar 0Posted Jul 25, 2016, 10:16 PM EDT
Hi, any suggestions on how to do this in Windows Phone 8.1
Pradeep Kumar 0Posted Jul 18, 2016, 11:07 PM EDT
This is the code I have written to save selected image to bitmap file, I am not getting any options to set the transform height or width options. Please advise
Pradeep Kumar 0Posted Jul 18, 2016, 11:05 PM EDT
If (args.Files.Count > 0) { IRandomAccessStream fileStream = await myStrFile.OpenAsync(FileAccessMode.ReadWrite); BitmapImage myBitmapImage = new BitmapImage(); myBitmapImage.SetSource(fileStream); myImgBrush.ImageSource = myBitmapImage; ellipse_Pic.Fill = myImgBrush; }
Pradeep Kumar 0Posted Jul 18, 2016, 9:33 PM EDT
I have written the following code to select an image from pictures library FileOpenPicker imgPicker = new FileOpenPicker(); imgPicker.SuggestedStartLocation = PickerLocationId.PicturesLibrary; imgPicker.FileTypeFilter.Add(".jpg"); imgPicker.FileTypeFilter.Add(".jpeg"); imgPicker.FileTypeFilter.Add(".png"); imgPicker.FileTypeFilter.Add(".bmp"); imgPicker.ViewMode = PickerViewMode.Thumbnail; imgPicker.PickSingleFileAndContinue(); How to set the transform properties to an image
Pradeep Kumar 0Posted Jul 18, 2016, 9:30 PM EDT
Hi Suresh,
Pradeep Kumar 0Posted Jul 18, 2016, 8:05 AM EDT
Hi Suresh, How to achieve the same in Windows Phone 8.1?
Artur TPosted Dec 22, 2015, 3:10 AM EST
Please write to my [email protected]
Artur TPosted Dec 22, 2015, 3:08 AM EST
how I can change crop_rectangle size?
Santhakumar MunuswamyPosted Aug 4, 2015, 6:07 PM EDT
Thanks for sharing :)