Share this article

Latest news

With KB5043178 to Release Preview Channel, Microsoft advises Windows 11 users to plug in when the battery is low

Copilot in Outlook will generate personalized themes for you to customize the app

Microsoft will raise the price of its 365 Suite to include AI capabilities

Death Stranding Director’s Cut is now Xbox X|S at a huge discount

Outlook will let users create custom account icons so they can tell their accounts apart easier

Microsoft issues porting guide to help migrate apps from Silverlight to the Universal Windows Platform

3 min. read

Published onApril 14, 2016

published onApril 14, 2016

Share this article

Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more

In this article

Toggle

It seems like every chance they get, Microsoft reminds developers that converting to the Universal Windows Platform is the best choice for most apps. They have gone out of their way to make step-by-step instruction guides to ease new apps onto the UWP and today’sblogfrom the Windows App Team is no different.

The Windows Dev Center has issued aporting guide, with significant detail, to help you manually migrate Windows Phone Silverlight apps over to UWP. However, the Silverlight to Windows 10 bridge can help you circumvent up to 80% of the work by converting the code automatically.

Step One: Download the Bridge

Step One: Download the Bridge

You can easily find the Silverlight to Windows 10 bridge onMobilize.NET, along with the Visual Studio 2015 (with at least Update 1) that can bedownloadedfor free.

Step Two: Run the Tool

Step Two: Run the Tool

Running the Windows Phone Silverlight-to-UWP conversion tool will take care converting your app’s manifest files to the new format. The only input needed to run the tool is the path of the project file you want to convert to UWP and the directory of where you want the newly created UWP files to be saved.

Step Three: Troubleshooting the missing DLLs

The most common cause of missing DLLs is the result of third party libraries being used in the Silverlight app. If the codes reference to DLLs that haven’t been migrated to UWP, it will cause unrecognized namespaces to crop up in your conversion. The best way to fix the missing DLL issues is to manually replace them with similar standard controls.

Step Four: Troubleshooting unconverted Silverlight code

While the bridge tool for Silverlight to UWP has approximately 2,300 mappings for API and XAMLs, sometimes it’s still not enough to cover every case of Silverlight’s coding. When it comes to these hiccups between the conversion process, you can consult thenamespace and class mappings resourcethat will help identify code that doesn’t have a UWP counterpart. If not, then you can decide whether you want to alter the unconverted code to use a different UWP class or create a helper class to wrap the unconverted class code.

Step Five: Troubleshooting controls and events

Your app is almost converted, but some mappings are not working as they should in the Universal Windows Platform. The controls behaving different could be adjusted by defining a field for the control and assigning it the control’s Loaded event. Using an MVVM approach by binding to decouple controls is also an option.

Since the Silverlight Bridge to Window tool is still in developer preview, it’s not ready to handle all of the conversions and requires some finesse. Even so, it is significantly more efficient than porting appsmanually. Converting your Windows Phone Silverlight app to the Universal Windows Platform will not only enable you to have a longer reach, but doing so will also bring a new audience to your product. With the UWP, apps are able to be accessed across many more devices to ultimately enhance your developing experience.

Radu Tyrsina

Radu Tyrsina has been a Windows fan ever since he got his first PC, a Pentium III (a monster at that time).

For most of the kids of his age, the Internet was an amazing way to play and communicate with others, but he was deeply impressed by the flow of information and how easily you can find anything on the web.

Prior to founding Windows Report, this particular curiosity about digital content enabled him to grow a number of sites that helped hundreds of millions reach faster the answer they’re looking for.

User forum

0 messages

Sort by:LatestOldestMost Votes

Comment*

Name*

Email*

Commenting as.Not you?

Save information for future comments

Comment

Δ

Radu Tyrsina