Generally the differences in the API’s between Browser Silverlight and Windows Phone Silverlight are pretty slim. However dealing with the phone can be quite different anyway. First there’s often less security restrictions on the phone to worry about. Secondly there’s a lot of phone specific APIs like sensor data, camera, contacts etc). The screen is also smaller so often some controls doesn’t make sense to have on the phone, or needs to have a separate layout to enhance the experience on this small touch-centric screen. Lastly (and very importantly) the small amount of memory, processing power and battery life means that performance is a concern. This often forces you to go down a slightly little avenue for your application, and for certain custom controls.
For the API differences I’m again going to be cheap and just point you to the main resource on MSDN that has some really good info on that matter:
- Differences Between Silverlight and Silverlight for Windows Phone
- Features supported in Silverlight for Windows Phone
- For information about supported and unsupported controls, see Controls in Silverlight for Windows Phone.
- For information on supported fonts in Silverlight for Windows Phone, see Fonts in Silverlight for Windows Phone.
- For additional information on input differences between Silverlight on Windows and Windows Phone, see Input in Silverlight for Windows Phone (note that most touch events are promoted to mouse events, so code that relies on this will continue to work to some degree).
- Silverlight for Windows Phone supports a composition thread for certain graphics animation and access to the graphics processing unit (GPU). For information on optimizing graphics performance using this architecture, see Performance Considerations in Applications for Windows Phone and Graphics in Silverlight for Windows Phone (note that Silverlight 5 also introduces a composition thread).
- In Silverlight for Windows Phone, effects such as Blur and DropShadow are not supported.
- Custom pixel shaders are not supported, so the PixelShader type is not supported.
- Silverlight applications on Windows Phone are hosted on the client device and do not run inside of a browser. Silverlight features that are based on a browser host are not supported. These features include the HTML DOM bridge, JavaScript programmability, and the Silverlight plug-in object reference.
- Isolated storage on Windows Phone does not enforce quotas to restrict the size of isolated storage for Silverlight-based applications. The default quota size of 1 MB does not apply. (however there’s still a 2Gb limit on Isolated Storage for WP7, or less if you run out of space).
- Manipulation events that Silverlight doesn’t have (well technically they are there but throw a not supported exception), are the same as in WPF, so WP7 has better touch closer to WPF than Silverlight.
No comments:
Post a Comment