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.
Related
no fm radio api found for windows phone 8.1 , and UWP
and how trigger radio on/off
i found 'using Microsoft.Devices.Radio' but not works on windows phone 8.1 only works for windows phone 7
In UWP it is now Windows.Devices.Radios, you can refer to the Radio class, but FM is not currently available. You can refer to RadioKind enumeration
Seems this will be supported in the future, I think you may submit a request to add this new feature for development through the Windows Feedback tool.
Yes, it is possible. Make a new project in Visual Studio for Windows Phone 8.0/8.1 Silverlight App after installing the installing the appropriate sdk.
and also create two project with win phone silverlight and class and another UWP and reference it in UWP app , now we able to use silverlight api in uwp
I have a Windows 8.1 C# project for windows store ready.
I want to make a copy of it for Windows Phone 8.
Is there any good and easy way to do this?
I use Visual Studio Ultimate (2012 and 2013).
There's no simple/automatic way to do it, but the code will be mostly compatible. The UI will probably need to be adjusted significantly.
If you target Windows Phone 8.1 WinRT you will find more of the code will work (Windows Phone 8.0 does not support WinRT, which is what Windows Store 8.1 apps use).
A possibly better way would be to create a new Universal Windows 8.1 WinRT project and copy your existing project code in, placing as much as possible in the shared project (or in class libraries), then create a new UI for the phone version (you can keep most of the actual code behind in the shared project - see my blog post here: http://grogansoft.com/blog/?p=760 - to minimise duplication. Note that this must target WP8.1, not 8.0.
If you absolutely must target WP8.0 then you may have no better option than to just copy in the code and adjust it where necessary. This will be relatively easy for a simple app, but relatively messy for a complex app that happens to use APIs that don't match up.
Well, they are different platforms, so you'll still have to adjust your code for that, but maybe converting your portable code to a portable class library will help you:
http://msdn.microsoft.com/en-us/library/vstudio/gg597391(v=vs.110).aspx
I am trying to implement Windows.Networking.BackgroundUploader in a Windows Phone 8.1 Silverlight app, which I've read is now possible. However, when I call CreateUpload I get
Class not registered (Exception from HRESULT: 0x80040154(REGDB_E_CLASSNOTREG))
The Windows.Networking namespace is added fine and the project builds ok.
If I create a new Windows Phone 8.1 Universal app, I can see that there are two 'Windows' references in the Object Browser, but in the Silverlight version only one is added and the Windows.Networking reference is missing. This looks like the cause of the error then. My question is, how do I add the 'right' reference to the Silverlight project? Or am I missing something else?
Thanks in advance.
You need to select option: "Internet (Client & Server)" in your projects' Package.appxmanifest file.
MORE INFORMATION:
A Windows Phone 8.1 Silverlight app has both WMAppManifest.xml and Package.appxmanifest files.
When you upgrade a Windows Phone 8.0 Silverlight project to Windows Phone 8.1 it adds the file: "Package.appxmanifest" which contains the packaging requirements for Windows Phone 8.1 specific features.
For more details see http://msdn.microsoft.com/en-us/library/windows/apps/dn642081(v=vs.105).aspx
I have updated my code to WP 8.1 and wanted to organise it better by using Class Libraries.
The doubt comes when I find there are 2 Class library project templates for Windows Phone:
Class Library (Windows Phone)
Class Library (Windows Phone
Silverlight)
If i select template 1, i see the assemblies referenced by default are .NET for Windows Store Apps and Windows Phone 8.1
If i select template 2, i got asked the target version of the Windows Phone OS (8.0 or 8.1) and the assemblies references by default are .NET for Windows Phone and Windows Phone.
Do you know the differences between them?
I have looked into the matter and seems it depends if you want to load the .NET runtime namespaces or not, am i correct? Are there any more differences?
The class library type will depend on whether your main app will be a Windows Phone 8.1 Silverlight app, or Windows Phone 8.1 XAML app.
The advantage of WP8.1 XAML app is that it is converged with Windows 8.1 - you can even create an Universal App that shares almost all code and xaml between the Win8 and WP8.1 apps.
The advantage of WP8.1 Silverlight app is that it is more closer to the old WP8.0 app - less changes are required, and also it has access to some APIs not available to WP8.1 XAML apps.
Recently I have upgraded Visual Studio 2013 update 2. There are lot of changes in this huge update and one among this update is Windows Phone 8.1 Apps you can start building now.
Currently I am developing an apps for which I need to configure certain value in WMAppManifest.xml file. Even in MSDN says that the file is under Properties but I could not find any. http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff769509(v=vs.105).aspx
Amazingly this entire file is missing and the value I want to change is not there any more.
Has anybody faced this issue and ay work around of how to find out the location of this file? Is it renamed.
I googled but failed to get what I was looking at. If anybody guide me that will be great.
Thanks
The WMAppManifest.xml file is only for Silverlight app and my guess is you created a Windows Phone 8.1 XAML app. The file you need is Package.appxmanifest, it contains more or less the same settings as WMAppManifest.xml used for Silverlight apps.