Win Phone System.Windows.Controls.Control未找到

时间:2014-07-15 17:39:36

标签: c# visual-studio-2013 windows-phone-8.1 windows-controls

我正在开发一个通用的Windows 8.1应用程序,虽然我主要处理Windows手机版本。

System.Controls.control应该适用于Windows Phone,但每当我将System.Windows.Controls.dll添加到我的Win Phone 8.1引用时,我的项目都不会编译,它会说:

Cannot find type System.Windows.Controls.Control in module System.Windows.dll

无论我是否真的说'#34;使用system.win .."都会发生这种情况。等,一旦我将它添加到我的项目引用中就会发生。这个dll来自我的programfiles(x86)/ microsoftsdks / silverlight目录。

有关如何解决此问题的任何想法?

1 个答案:

答案 0 :(得分:2)

您正在尝试在WinRT应用中使用Silverlight控件。那不行。新的UI控件是Windows.UI.Xaml.Controls的一部分。

查找该命名空间here中的控件列表。另外,请阅读Windows Phone 8.1中提供的more about the two different XAML models

相关问题