Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Images Selection

Am making an application in WP7 using Windows Phone SDK 7.1 / C#

Am using photo chooser task. But I want to select 9 images and here I can select only one Image.

How can I select 9 images at a stretch?

Please Help me, here is my code:

public partial class MainPage : PhoneApplicationPage
{
    PhotoChooserTask photoChoserTask;
    // Constructor
    public MainPage()
    {
        InitializeComponent();
    photoChoserTask = new PhotoChooserTask();
    photoChoserTask.Completed += 
             new EventHandler<PhotoResult>(photoChooserTask_Completed);
    }


void photoChooserTask_Completed(object sender, PhotoResult e)
{
  if (e.TaskResult == TaskResult.OK)
  {
     y.Text= (e.ChosenPhoto.Length.ToString());

    //Code to display the photo on the page in an image control named myImage.
    //System.Windows.Media.Imaging.BitmapImage bmp = 
            //new System.Windows.Media.Imaging.BitmapImage();
    //bmp.SetSource(e.ChosenPhoto);
    //myImage.Source = bmp;
  }
}

private void Button_Click(object sender, RoutedEventArgs e)
{       
    {
        try
        {
            photoChoserTask.Show();
        }
        catch (System.InvalidOperationException )
        {
            MessageBox.Show("An error occurred.");
        }
    }
}

}
}
like image 348
Raunaq Patel Avatar asked Mar 10 '26 13:03

Raunaq Patel


1 Answers

I've release a MultiPhotoChooser on CodePlex for WP8.0 (At least works on 8.0 because that's the platform I developed on.)

Feel free to download it and try it out

https://multiphotochooser.codeplex.com/

Here's how it looks like :

Media Library in Sweetshot App

Please give me a thumbs up if it helped you for building the feature you need. Thanks.

like image 123
Alan Feng Avatar answered Mar 12 '26 04:03

Alan Feng



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!