Porting Windows Phone Silverlight to HTML Windows Runtime 8
[This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation]
Note For info about porting to a Universal Windows Platform (UWP) app for Windows 10, see Move from Windows Phone Silverlight to UWP.
As you read this topic, you can refer to Windows Phone Silverlight to Windows Runtime namespace and class mappings.
If you are migrating a game or graphics-intensive application, you must use the functionality provided in the Trident graphics model, including Canvas and SVG support, for WWAHost and Internet Explorer 10. This HTML-specific graphics model includes support for 2D and 3D transformations through W3C standards-compliant CSS behaviors. For more information, please see the W3C CSS 3D Transform draft specification.
- You can express individual screens as HTML pages. Within these pages, you can express containers and discrete organizational elements with <div> elements or "frames" (connected or static).
- Trident 6.0 -- An HTML- and CSS-based model for the layout and rendering of visual components that implements Canvas for the real-time drawing and manipulation of bitmap graphics, and Scalable Vector Graphics (SVG) support for vector graphics. (Trident 6.0 is the set of libraries used by Internet Explorer 10 for the display of content, and can be used to support additional graphics and rendering behaviors.)
|API type||Silverlight API namespaces||Windows Runtime API namespaces (C#/Visual Basic)|
|Devices||Microsoft.Devices, Microsoft.Devices.Radio, Microsoft.Devices.Sensors||Windows.Devices.Enumeration, Windows.Devices.Enumeration.Pnp, Windows.Devices.Input, Windows.Devices.Sensors|
|Windows Phone app model and environment||Microsoft.Phone, Microsoft.Phone.Info, Microsoft.Phone.Notification, Microsoft.Phone.Reactive, Microsoft.Phone.Shell, Microsoft.Phone.Tasks||Windows.Networking.PushNotifications, Windows.Devices.Sms, Windows.ApplicationModel.Background, Windows.ApplicationModel.Contacts, Windows.ApplicationModel.Contacts.Provider, Windows.ApplicationModel.Core|
|Maps||Microsoft.Phone.Controls.Maps, Microsoft.Phone.Controls.Maps.AutomationPeers, Microsoft.Phone.Controls.Maps.Core Microsoft.Phone.Controls.Maps.Design Microsoft.Phone.Controls.Maps.Overlays, Microsoft.Phone.Controls.Maps.Platform||Windows.Devices.Geolocation|
|Networking and syndication||Microsoft.Phone.Net, Microsoft.Phone.Net.NetworkInformation||Windows.Networking, Windows.Networking.BackgroundTransfer, Windows.Networking.Connectivity, Windows.Networking.NetworkOperators, Windows.Networking.Sockets, Windows.Web.AtomPub, Windows.Web.Syndication|
|Programming and data models||System||Windows.Foundation, Windows.Foundation.Collections, Windows.Foundation.Metadata, Windows.Data.Xml.Dom, Windows.Data.Xml.Xsl, Windows.Data.Json|
|Automation and diagnostics||System.Diagnostics, System.Windows.Automation.Peers||Windows.Foundation.Diagnostics|
|Graphics (3D transforms)||XNA Framework Class Library, Content Pipeline Class Library||No equivalent at this time.|
|Controls and UI infrastructure||Microsoft.Phone.Controls, Microsoft.Phone.Controls.Primitives,||Windows.UI.ApplicationSettings, Windows.UI.Core, Windows.UI.Input, Windows.UI.Notifications, Windows.UI.ViewManagement|
|Storage||System.IO.IsolatedStorage class||Windows.Storage, Windows.Storage.FileProperties|
You can access much of the .NET Framework Class Library by using the Windows Runtime. Functionality that is not specific to the Windows Phone platform typically has a counterpart API in the .NET Framework Class Library. For example, classes and methods available in the Windows Phone Silverlight version of the System and System.Diagnostics namespaces may also be available in the Windows Runtime as their .NET Framework counterparts. For the complete set of .NET Framework APIs available in Windows Phone Silverlight, and which may also be accessible in the Windows Profile, see the Silverlight class reference documentation.
Note The Windows Profile provides a wrapper for over 12,000 of the .NET Framework APIs. However, not all of the .NET Framework APIs are currently supported. For a complete list, please refer to the Windows Profile API documentation.