user824249
user824249

Reputation:

How to open custom album on Windows Phone Mango

I'm using this code to open Pictures Library:

PhotoChooserTask imageChooser = new PhotoChooserTask();
imageChooser.Show();

So is there any way to open desired album, for example "Saved Pictures" or some user created album?

Thanks.

Upvotes: 2

Views: 768

Answers (1)

coder
coder

Reputation: 13248

There is no constructor for PictureAlbum, Picture.Album is read only preventing reassignment of pictures between already existing albums and there is not method to submit a picture album.

You can place images in the media library using MediaLibrary.SavePicture Method and you can access them.

If you want to access the from Media Library in Windows Phone you can do this way:

 MediaLibrary m = new MediaLibrary();

foreach (var r in m.Pictures)
{
Stream imageStream = r.GetImage();

var imageToShow = new Image()
{
Source = PictureDecoder.DecodeJpeg(r.GetImage())
};

lstImageFromMediaLibrary.Items.Add(imageToShow);
}
}

Upvotes: 2

Related Questions