我需要将哪些参考添加到Windows应用商店应用以使用Bitmap类? [英] What reference do I need to add to a Windows Store app to use the Bitmap class?

查看:85
本文介绍了我需要将哪些参考添加到Windows应用商店应用以使用Bitmap类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的应用中使用Bitmap类,但是此代码:



I need to use a Bitmap class in my app, but this code:

public class PushpinMetadata
{
    public string FileName { get; set; }
    public DateTime DateTimeTaken { get; set; }
    public Bitmap thumbnail { get; set; }
}



...失败,因为找不到位图。我需要在项目中添加什么参考来使Bitmap可以解析?



或者我还需要别的东西 - 图片?图片?或者...... ???



这是一个Windows应用商店应用(Windows 8.1)


...fails because "Bitmap" cannot be found. What reference do I need to add to my project for Bitmap to be resolvable?

Or do I need something else - Picture? Image? Or...???

This is a Windows Store app (Windows 8.1)

推荐答案

使用Windows.UI.Xaml.Media.Imaging添加:;



参考:加载和处理位图 [ ^ ]
Add: using Windows.UI.Xaml.Media.Imaging;

Reference: Loading and processing bitmaps[^]


啊哈,瞧,尤里卡 - 显然我需要的BitmapImage。
Aha, voila, and Eureka - it's apparently BitmapImage that I need.


这篇关于我需要将哪些参考添加到Windows应用商店应用以使用Bitmap类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆