简体   繁体   中英

Win Phone System.Windows.Controls.Control not found

I'm developing a universal windows 8.1 app, though I'm primarily working on the windows phone version.

System.Controls.control should work for windows phone, but whenever I add System.Windows.Controls.dll to my Win Phone 8.1 references, my project won't compile and it says:

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

This happens whether or not i actually say "using system.win.." etc, it happens as soon as I add it to my project references. This dll is from my programfiles(x86)/microsoftsdks/silverlight directory.

Any ideas on how to fix this issue?

You're trying to use Silverlight controls in a WinRT app. That won't work. New UI controls are a part of Windows.UI.Xaml.Controls.

Find the list of controls which are in that namespace here . Also, please read more about the two different XAML models available in Windows Phone 8.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM