Move from Windows Phone Silverlight to WinRT

Applies to Windows and Windows Phone

If you’re a developer with a Windows Phone Silverlight app, then you can make great use of your skill set and your source code in the move to the Windows Runtime (WinRT). WinRT is the technology that lets you build universal Windows apps. You can refer to What's a Windows Runtime app? for more background on WinRT and universal Windows apps.

When you port your app to the Windows Runtime, not only will you be able to take advantage of the latest phone features, you'll also be using the same app model and UI framework as Windows Store apps—even the same version of common features such as background tasks. That makes it easy to support PCs, tablets, and phones from one code base. And that will immediately multiply your app's potential audience and will create new possibilities with shared data, purchased consumables, and so on. For more info, see Building universal Windows apps for all Windows devices.

The Windows Runtime version of your phone app (also known as a Windows Phone Store app) will run on any phone with the free Windows Phone 8.1 update. Even so, if you choose to, the Windows Phone Silverlight version of your app and the Windows Runtime version of it can both be available to customers at the same time.

XAML or HTML?

Windows Phone Silverlight has a XAML UI framework based on Silverlight 4.0, and you program against a version of the .NET Framework and a small subset of Windows Runtime APIs. Since you used Extensible Application Markup Language (XAML) in your Windows Phone Silverlight app, it's likely that XAML will be your choice for your Windows Runtime version. You will find the managed APIs, the XAML markup, the UI framework, and the tooling extremely familiar. You can use C++, C#, or Visual Basic along with XAML.

Alternatively, you can build a functionally equivalent app—calling many of the same Windows Runtime APIs—using JavaScript, Cascading Style Sheets (CSS), and HTML5 along with the Windows Library for JavaScript. Although the Windows Runtime UI frameworks of XAML and HTML are different from one another, whichever one you choose will work universally across the range of Windows devices: PCs, tablets, and phones.

The few exceptions to the rule

The good news is that there's very little that's not supported in the Windows Runtime. Most of your skill set and source code translates very well over to universal Windows apps, as you'll read in the rest of this porting guide. But here are the few Windows Phone Silverlight features that you may have used for which there is no Windows Runtime equivalent.

Feature for which there is no Windows Runtime equivalentWindows Phone Silverlight documentation for the feature
Microsoft XNA. In general, Microsoft DirectX using C++ is the replacement. See Developing games and DirectX and XAML interop.XNA Framework Class Library
Alarms and remindersAlarms and Reminders for Windows Phone 8
Clipboard APIsClipboard class

Generating bitmaps for Live Tiles in a Background Task using managed code.

But you can generate a bitmap using native code with Windows.ApplicationModel.Background.BackgroundTaskBuilder.

Background agents for Windows Phone 8
Lens appsLenses for Windows Phone 8
Lock screen background providerLock screen background for Windows Phone 8
Photos extensibilityExtending the photo edit picker for Windows Phone 8
Ringtone providerHow to use the save ringtone task for Windows Phone 8
VoIP appsVoIP apps for Windows Phone 8

 

In this section

TopicDescription

Namespace and class mappings

This topic provides a comprehensive mapping of Windows Phone Silverlight APIs to their Windows Runtime equivalents.

Porting Windows Phone Silverlight to XAML WinRT

When porting a Windows Phone Silverlight app to the model for XAML Windows Runtime apps, most of your knowledge and experience will transfer, as will much of your source code and the software patterns you use. Even your UI markup and design can port over readily. You may be surprised at how relatively easy the process is, even if there is a challenge or two along the way.

Porting Windows Phone Silverlight to HTML WinRT

Migrating a Windows Phone Silverlight app to a Windows Store app using JavaScript can be either a straightforward effort or a difficult one, depending on the type of app. If you are migrating a simple UI app—a utility or lightweight game—JavaScript can be an effective destination platform for Windows 8 ports from Windows Phone Silverlight, using well-known, standard web-development technologies. If you are migrating an app with significant UI components or a graphics-rich environment, you should consider a Windows Store app using C++, C#, or Visual Basic and XAML.

 

Related topics

Documentation
What's next for Windows Phone 8 developers
Building universal Windows apps for all Windows devices
Magazine articles
Visual Studio Magazine: Windows Phone 8.1: A Giant Leap Forward for Convergence
Presentations
The Story of Bringing Nokia Music from Windows Phone to Windows 8

 

 

Show:
© 2014 Microsoft