gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-29 21:33:15 27 4
gpt4 key购买 nike

我对windows media capture 命名空间很困惑,我想在windows 8.1 中导入命名空间来开发相机功能。

仅供引用,我使用 visual studio 2013 和 windows 7 64 位进行开发,我也已经尝试安装 windows 8 软件开发工具包,但我仍然找不到命名空间。

我错过了什么吗?

最佳答案

我终于完成了在 Windows 7 x64 中为 Windows 8.1 Table 开发应用程序,并想分享我在这里的一些经验。

步骤:

  1. 在 wpf 应用程序中编辑 .csproject(添加 <TargetPlatformVersion>8.1</TargetPlatformVersion><PropertyGroup> 内)

  2. 添加“Windows”库引用
    Add Windows Reference

  3. 加载一些 .Net Framework 4 库(System.Runtime.dll、System.Runtime.InteropServices.WindowsRuntime.dll、System.Threading 和 System.Threading.Task),位置通常在 C:\Windows\Microsoft .NET\Framework64\v4.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 和数据库操作。

引用:

关于c# - 如何在我的 WPF 项目中导入 windows.media.capture?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30772652/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com