0

我正在開發一個通用的Windows 8.1應用程序,但我主要是在windows phone版本上工作。Win Phone System.Windows.Controls.Control not found

System.Controls.control應該適用於Windows Phone的,但每當我添加System.Windows.Controls.dll我贏手機8.1的引用,我的項目將無法編譯和它說:

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

無論我是否真的說「using system.win ..」等等,只要將它添加到我的項目引用中,就會發生這種情況。此DLL來自我的程序文件(x86)/ microsoftsdks/silverlight目錄。

有關如何解決此問題的任何想法?

+0

你最終解決了這個問題嗎? – newenglander

回答

2

您試圖在WinRT應用程序中使用Silverlight控件。這是行不通的。新的UI控件是Windows.UI.Xaml.Controls的一部分。

查找該名稱空間中的控件列表here。另外,請閱讀Windows Phone 8.1中的more about the two different XAML models