如何在我的WPF项目中导入windows.media.capture?

Dik*_*nia 6 c# wpf windows-7-x64 visual-studio-2013 windows-8.1

我真的很困惑windows media capture命名空间,我想导入命名空间来开发windows 8.1中的camera功能.

仅供参考,我开发使用visual studio 2013和Windows 7 64位,我已经尝试过安装Windows 8软件开发套件,但我仍然找不到命名空间.

我错过了什么吗?

Dik*_*nia 6

最后,我已经完成了在Windows 7 x64中为Windows 8.1 Table开发应用程序,并希望分享我在这里的一些经验.

脚步 :

  1. 在wpf app中编辑.csproject(添加<TargetPlatformVersion>8.1</TargetPlatformVersion>内部<PropertyGroup>)

  2. 添加"Windows"库参考
    添加Windows引用

  3. 通常在C:\ Windows\Microsoft.NET\Framework64\v4中加载一些.Net Framework 4库(System.Runtime.dll,System.Runtime.InteropServices.WindowsRuntime.dll,System.Threading和System.Threading.Task)的位置.0.30319 \

  4. 加载System.Runtime.WindowsRuntime.dll(C:\ Program Files(x86)\ Reference Assemblies\Microsoft\Framework.NETCore\v4.5)

但我们无法调试应用程序,因为与Windows 7具有不同的运行时,我们只能构建和部署到Windows 8.1平板电脑.

我已经使用MSSQLServer Compact DB Express 2014完成了相机功能,GPS和数据库操作.

参考: