xna - 为什么我不能通过照片选择器添加照片时看到位图类

时间:2011-04-28 08:22:04

标签: windows-phone-7 xna

我正试图通过photochooser为我的游戏添加照片。 我正在使用所有正确的使用(图像,shell等),但无法进入位图类 我错过了什么?

更新

我尝试使用System.Windows.Media.Imaging。 仍然找不到bitmapimage类。 我找不到使用System.Windows.dll。 你可以说得更详细点吗?我在bitmapImage下面有一条sgwigly行。

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);

            }         
        }

1 个答案:

答案 0 :(得分:1)

如果您尝试使用System.Bitmap,则手机不支持此功能。

您可能需要System.Windows.Media.Imaging.BitmapImage(在System.Windows.dll中)。