2

I want the user be able to choose an avatar for himself. I implement selecting an image like this:

PhotoChooserTask photoChooser = new PhotoChooserTask();
photoChooser.Completed += photoChooser_Completed;
photoChooser.Show();

But after this, I want to show a one cell grid, and user can zoom in and out the picture to locate a part of image which wants be in the avatar. just like Instagram apps or WhatsApp.

How can I implement this second part? any reference or any example is appreciated. thanks

user2757047
  • 85
  • 1
  • 8
  • refer [this](http://stackoverflow.com/questions/4678268/how-to-zoom-in-and-zoom-out-images-in-wp7) and [this](http://stackoverflow.com/questions/13969400/pinch-to-zoom-functionality-in-windows-phone-8) this may helps you – Mohamed Thaufeeq Sep 07 '13 at 13:31
  • are you asking like selecting the thumbnail view for facebook profile pictures? – Nithin Nayagam Sep 07 '13 at 13:32

2 Answers2

2

Set the PixelHeight and PixelWidth properties of the PhotoChooserTask before calling Show. The user will then be able to crop the image to the dimensions set.

PhotoChooserTask photoChooser = new PhotoChooserTask();
photoChooser.PixelHeight = 100;
photoChooser.PixelWidth = 100;
photoChooser.Completed += photoChooser_Completed;
photoChooser.Show();
keyboardP
  • 68,824
  • 13
  • 156
  • 205
0

For the "locating a part of the image" question, i think this will help

Getting a particular Portion of Image (Picture)

Display the image inside a rectangle and you can cut out only the part that appears inside the rectangle.

Community
  • 1
  • 1
Nithin Nayagam
  • 458
  • 2
  • 5
  • 9