xna - why cant i see the bitmap class while adding photos through photoChooser
I am trying to add photos to my game through photochooser. I am using all the right usings (images, shell, etc.) but can't get to the bitmap class What am I missing?
Update:
I tried using System.Windows.Media.Imaging. and still can't find the bitmapimage class. 开发者_高级运维I can't find using System.Windows.dll. can you be more specific? I get a sgwigly line below bitmapImage.
void photoChooserTask_Completed(object sender, PhotoResult result)
{
if (result.TaskResult == TaskResult.OK)
{
var bitmapImage=new
System.Windows.Media.Imaging.BitmapImage bmp =
new System.Windows.Media.Imaging.BitmapImage();
bmp.SetSource(result.ChosenPhoto);
}
}
If you're trying to use System.Bitmap
then this isn't supported on the phone.
You probably want System.Windows.Media.Imaging.BitmapImage
(in System.Windows.dll) instead.
精彩评论