c# - 在WPF中, "using System.Windows;"与 "using Windows.Foundation;"相同问题

标签 c# wpf oop namespaces windows-store-apps

我正在用 WPF C# 做一个项目。我想知道“using System.Windows”在 WPF 中是否相当于 Windows 应用商店应用程序的“using Windows.Foundation;”由于我在使用 Point、Rect 和 Size 关键字时遇到问题,我想知道如何让它在 WPF 中工作。

最佳答案

不,不完全是。某些 WinRT 类型和 .NET 类型之间存在映射,您可以在这里找到它:http://msdn.microsoft.com/en-us/library/windows/apps/hh995050.aspx

.NET 的 System 命名空间中找到的许多类都可以在 WinRT 的 Windows.Foundation 命名空间中找到。 System.Windows 最接近的匹配是 Windows.UI.Xaml,但它没有完全相同的类型。

关于c# - 在WPF中, "using System.Windows;"与 "using Windows.Foundation;"相同问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20653531/

相关文章:

c# - 没有直接在类中实现的接口(interface)的实际用法是什么?

c++ - 将 STL 分配器与 STL vector 一起使用

c# - XP 上的 WPF 文本太模糊

c# - 在哪里通过代码设置验证错误?

c# - 系统.ComponentModel.Win32Exception : 'Access is denied' error while Automating a WPF app using FlaUI+SpecFlow

Python setter TypeError : 'int' object is not callable

c# - 使自定义对象线程安全

c# - 在 Provider Ninject 中检索自定义绑定(bind)参数

C# - 文件路径的正则表达式,例如C :\test\test. 可执行文件

c# - 条形码到产品名称转换器