Windows Phone 7 project not updating properly - windows-phone-7

Using VS2015 I upgraded a WP 7.1/7.7 project.
I was developing and testing fine using the 8.1 emulator for a couple of months until I realized that I was missing then newer 8.1 controls in the toolbox.
I started a new separate 8.1 project and I can see a large range of new controls like Listbox and ComboBox that don't exist in the 7.1 upgraded app.
Looking at the project properties the Target Windows Phone OS Version is set to Windows Phone 8.1.
I've searched all over and can't find any other settings to tweak.
The project has the older Windows Phone Toolkit 4.2013.8.16.
I wonder if that blocks the new tools?
How can I get the 8.1 one controls to turn on?

There's two frameworks on Windows Phone 8.1: Silverlight and WinRT. When you upgraded to 8.1, since your project was using Silverlight (WinRT wasn't available on Windows Phone 7), it was set to target Silverlight 8.1. That's why you can't use the WinRT controls. The thing is, WinRT and Silverlight have completely different controls, so you can't automatically convert a project from one to another. You've got to consider whether you really need/want to use WinRT. If so, you'll have to rewrite large portions of your UI code to accommodate with the new controls.
If you want to make the conversion, you should first have a look at the Microsoft documentation to understand the key differences between the two frameworks: https://msdn.microsoft.com/en-us/library/windows/apps/hh452743.aspx
Note that Windows 10 universal apps (the ones that can run on phone and desktop) use WinRT. Silverlight is deprecated, and sooner or later you'll have to upgrade.

Related

Is there a way to convert Windows Desktop applications to Universal UWP and Vice Versa?

In Visual Studio I am trying to decide which type of application I should start with. I want to make it available to as many devices as I can.
If I make a Windows desktop application (.NET/WPF), I could convert it to a UWP but it only targets desktop applications, which is pointless device-wise.
But if I make a UWP, it would work with Microsoft devices, but not ones running a Windows older than Windows 10. A lot of people still use older versions of Windows, and I would rather make a Windows desktop application than limit the use to a specific version of Windows.
It would also be cool to be able to make it work on other devices like Android.
QUESTIONS: Is there a way to convert a Desktop application to a Universal UWP (with or without the code)? Is there a way to convert a Universal UWP to a Desktop application (or make it run on older Windows machines)? If not, what would be the best application type and why?
Also, is there a different application type I should use instead that I'm not thinking of?
NOTE: Microsoft Project Centennial converts Desktop applications to UWP's, but they only work on desktop machines.
I would go UWP and use Xamarin forms if I were you.
Using Xamarin you can write the one UWP app and deploy to Windows, Android, and iOS.
You answered most of your question yourself already. You have the following options (considering you want to continue using your .NET/XAML skillset as you mention WPF and are not looking into a web alternative):
Write a desktop app in WPF: you want to support Windows 7 or need features that are currently not available yet in UWP (some APIs, sandboxed UWP, ..). As you mentioned, you can use the Desktop Bridge to bring the app to the Windows 10 store as well with the downside of not running on mobile, HoloLens, Xbox (as of today). Then again, WPF doesn't run on those platforms either.
Write the app from scratch in UWP: run on Windows 10 on all available platforms. Yes, you will leave the Windows 7 users in the cold but not that Windows 7 is already in the extended support block so people will have to upgrade at some point.
Write the app from scratch with Xamarin.Forms, creating a single app that runs on Windows 7 (WPF), UWP, Android and iOS. Note that this is a somewhat different XAML dialect right now, but XAML Standard is working on unifying the dialects in the future.
A bit more work is to share most of your code with .NET Standard or PCL libraries and write multiple native UI's on top of it (which can be done with Xamarin).
If you're looking for longer term support pick either UWP (the way forward for Windows) or Xamarin.Forms.
Try Microsoft's Desktop Bridge tool for UWP. Using the Desktop Bridge, you can gradually migrate your code to the Universal Windows Platform (UWP) to reach every Windows 10 device, including phones, Xbox One, and HoloLens
Using Desktop bridge tool, you can
Convert MSI to APPX package
Upload your Desktop app (after conversion to APPX package) to Store
Take advantage of UWP features like Live tiles, Push Notification and many more)
And, for Android and iOS app try Xamarin. UWP project cannot converted to xamarin project. You've to write seperate project. I recommend you to try Xamarin.Forms which allows you to boild UWP, Android and iOS app with shared code.

Xamarin Forms for Windows Desktop app?

I have a need to create a desktop application that can run on Windows machines (Windows 7, 8, 10 and Windows Server). I understand I can use Classic WPF, but prefer to use Xamarin Forms.
Does XF support Windows Desktop apps? If so, are there any gotchas to be aware of?
The next release of Xamarin Forms, Xamarin Forms 3, is going to add full support for desktop apps on Windows, Mac OS and Linux. The MacOS support is in preview now, but the Windows support is still in development.
As I understand it, the plan is to use WPF for the Windows support, so your solution would include a WPF project in addition to each of the other platform specific projects. That will allow development of traditional desktop Windows apps, rather than UWP type apps.
The hope/assumption here is that, because these are WPF apps they should therefore be able to run on versions of Windows that don't support UWP apps - Windows 7 and Server 2008 for example.
There's more on what's coming in Xamarin Forms 3 on the Xamarin Blog here, and also in the Microsoft Build 2017 talk by David Ortinau.
I was at a talk by Xamarin TSP Michael Sivers last night and he mentioned that there are discussions ongoing about a XAML standard that could be adopted by both Xamarin and WPF which makes a lot of sense in the context of Xamarin forms apps on WPF.
on Windows, Xamarin Forms supports UWP apps only.

How to register my app so that it appears in the phote edit list in windows phone 8.1 runtime

How can I register my windows phone 8.1 runtime app so that it appears in the poto edit list?
The only way I see is to create an app for windows phone 8.0 silverlight (there is a template in VS 2013) then edit the wmappmanifest.xml and then upgrade the project to wp81.
But I think there must be another way to achieve that directly in a wp81 runtime project.
Does anyone know how to do that properly?
According to MSDN article
Migrating your Windows Phone 8 app to a Windows Runtime XAML app
one of the Windows Phone 8 features for which there is no Windows Phone Store equivalent is extending the photo edit picker.
So, in case you're building a Windows Phone WinRT app, this won't be possible.

What is the difference between "Windows Phone applications" and "Silverlight for Windows Phone applications"?

I was watching some video tutorial for developing Windows Phone 7 apps (& hoping to develop Windows 8 apps on that basis ;) The guy in the video tutorial was using Visual Studio 2010 and I have Visual Studio 2012. He created a new project using the option "New -> Project -> Silverlight for Windows Phone". Although I don't have such an option I do have an option called "New -> Project -> Windows Phone". This got me wondering whether there is a difference between those two. Could anybody explain the difference between them, if there is any?
Visual Studio 2010 can only make applications for Windows Phone 7. And Silverlight is the only API available to third-party developers on WP7 (even XNA is based on Silverlight).
With Windows Phone 8 (supported by Visual Studio 2012), new kind of applications were added: native (C++ based), HTML5... That's why calling the category "Silverlight for Windows Phone" didn't make sense anymore, and it was renamed simply "Windows Phone".
It's just a name, it makes no difference to you. When creating a new "Windows Phone app" project, Visual Studio will ask you which version you want to target. If you pick "Windows Phone 7.1", you'll get the exact same API that you had in Visual Studio 2010.
Microsoft only trying to reduce the terminology and popularize certain ways.
Windows phone app is the same as Silverlight for windows phone. the only difference is that Silverlight project in visual studio 2010 targets at the developer choice windows phone 7.0 or Mango (Mango is numbered by the SDK as Windows Phone OS 7.1, while users call it Windows Phone 7.5) or 7.8 according to updates installed. But if you use the windows phone project in visual studio you will target either Windows phone Mango or 7.8 or 8. please note that optional updates may be needed to target some platforms as Windows phone 7.8. windows phone 7.8 is basically a windows phone 7 with some feature backported to it from windows phone 8 as multi size live tiles and some features not backported to it as arabic support.
Silverlight and XNA were completely separate ways to make apps in Windows Phone 7.0. No code silverlight code could be used in a XNA project, nor XNA code could be shared in silverlight project in WP7.0 . Programmers of Windows Phone 7.0 had to know the meaning of each and when to use before choosing. The learn paths of silverlight and xna were too separate that you could learn one and totally ignore the other; in fact most programmers learnt only one of the two. You had to choose your path between the two before implementing a big app, as there is no way back :i.e, no way passing code between the two.
However, starting of Windows Phone Mango, Microsoft introduced Silverlight/XNA. Silverlight/XNA is a new application model for Windows phone Mango. It allows XNA inside Silvelight App. Migrating an XNA game to Silverlight/XNA is not an easy task, but would be rewardable.
Silverlight have UI controls as Textblock and Drop list and have layouts as Grid and stackpanel; so it is easy to make an app in silvelight that look like a form, while XNA is geared toward games , as it is a state based programming . it is very hard to implement a drop list in XNA for most developers.
Silverlight app was renamed to windows phone app to popularize it as a starting point, without having to do a deep thinking in a choice.
Silverlight is a stripped down version of Windows presentation foundation, removing the ability to define your own controls.And Silverlight for windows phone is an even more stripped down version , removing all controls that do not fit on mobile , and removing most of cryptography libraries.
This is the same way microsoft renamed metro-style apps to be windows 8 app, and windows apps to windows forms apps; and then windows forms and WPF were renamed later to Windows desktop apps.

How to downgrade a Windows Phone 8 app?

I originally made an app for WP7 then a while later decided to do a complete overhaul of UI and code which is when WP8 came out so I took down the old app and made a new one specifically targeting the newest platform, however I now want to 'port' it back down to target the old audience as well.
I've had a few attempts but it seems to be a tedious task, is there any easy way to do this?
Thanks.
As per the above answer there is no automated way to revert the projects; however I usually separate out as much logic as I can into a Windows Phone class library which can be shared by both Windows Phone 7 and 8 projects. So my advice is to copy across what you can (VMs, Services, etc.) to a separate class project, setup a new Windows Phone 7 project, and bring across your WP8 views and remove any incompatible bits such as the new maps control and reference the shared library between both platforms.
No, unfortunately you cannot downgrade a windows phone 8 project to windows phone 7. You can only upgrade a windows phone 7 project to windows phone 8.

Resources