Reputation: 8624
I have a library for Windows Phone 8.0 and Windows 8 and thought to make the same to support the Windows Phone 8.1 and Windows 8.1 Universal applications.
But soon as I tried to port my code in a Universal XAML library or even when trying some APIs in a Windows Phone 8.1 Universal Application that is created using the template I've seen that are missing, for example,
using Microsoft.Phone.Info;
using Microsoft.Phone.Net.NetworkInformation;
Or I was using the PhoneApplicationFrame class, RootFrame in the App.xaml.cs file that is now too changed dramatically.
Where do I find these namespaces to get information related to the device?
Upvotes: 2
Views: 1048
Reputation: 15268
Here are the Windows Runtime APIs equivalents of the APIs you mentioned:
Please not that you won't have 1:1 equivalent. You'll have access to new functionality but other will be missing (example : the Battery API).
About the changes in the PhoneApplicationFrame
, you shouldn't try to fit the Silverlight model (navigation, frame system...) into the new Universal one. Instead, I recommend to use the default project template and use that model (with the Helper classes like NavigationHelper
and SuspensionManger
).
EDIT (thanks @Romasz): Here is an MSDN page that should help you Migrating your Windows Phone 8 app to a Windows Runtime XAML app
Upvotes: 4