locked
Browser / WP7 compatible application RRS feed

  • Question

  • Hello,

    Hopefully this is the right place to ask.  I'm investigating if it's possible to create a web-based Silverlight application that can be viewed from a browser AND from a Windows Phone 7 device.

    I have developed a standard Silverlight 4 application, which I can access via my browser. I downloaded the WP7 Tools and when I use the device emulator to access my application (I don't have a WP7 device) I can only see the icon to go download the Silverlight framework. Then I started building a WP7 Silverlight application that looks good in my device emulator, but I realized that I can only deploy it to the real device or the emulator. 

    Then it hit me that both Silverlight frameworks are different and I was wondering if there was some overlapping or one contains the other. Could I somehow build a WP7 very simple app (few pages to navigate between them) using the WP7's Silverlight framework and somehow deploy it to a website so it can be accessed via a browser? I'm aware of the obvious differences between what the device can offer (sensors, UI input, etc), but if I keep my navigation app simple enough, is that even possible? Could you provide a public URL example of a Silverlight application that I can visit using the device emulator?

    Thanks in advance for your recommendations

    D

    Thursday, September 16, 2010 3:35 PM

Answers

  • The short answer is "no".  There is no in-browser Silverlight on the phone nor a way to automatically install a Silverlight for Windows Phone app onto the phone via a web site.

    Technical limitations aside sharing a common UI across the browser and phone would most likely end up with so many differences and conditional code paths that I'd suggest each platform have its own UI that is designed for that display.  Something that looks great in browser most likely will fall down when attempting to use it on a device that is designed to be touched.

    That said all is not lost :) It's recommended that you share model and API data between desktop and mobile by using Silverlight 3 class libraries.  You can include a SL3 class library in a Windows Phone project and get a great deal of reuse that way.  You'll need to use Silverlight 3 though as Silverlight on the phone is based on SL3 vs. SL4.

    Thursday, September 16, 2010 11:50 PM

All replies

  • It occurred to me that I could create a Silverlight control hosting the core of my application (image browsing) and then use it in two different Silverlight container projects: one for a Web-based Silverlight app and one for WP7.

    Is this an approach you would recommend?  Do you know of someone that has already done this?

    Thanks for any hints

    D

    Thursday, September 16, 2010 4:17 PM
  • The short answer is "no".  There is no in-browser Silverlight on the phone nor a way to automatically install a Silverlight for Windows Phone app onto the phone via a web site.

    Technical limitations aside sharing a common UI across the browser and phone would most likely end up with so many differences and conditional code paths that I'd suggest each platform have its own UI that is designed for that display.  Something that looks great in browser most likely will fall down when attempting to use it on a device that is designed to be touched.

    That said all is not lost :) It's recommended that you share model and API data between desktop and mobile by using Silverlight 3 class libraries.  You can include a SL3 class library in a Windows Phone project and get a great deal of reuse that way.  You'll need to use Silverlight 3 though as Silverlight on the phone is based on SL3 vs. SL4.

    Thursday, September 16, 2010 11:50 PM
  • Hi Shawn,

    Thank you for the advice. This is what I was looking for to make some decisions. I will consider your comment about SL3 instead of SL4.  Do you know if this is a temporary solution or would I be eventually able to do the same with SL4?

    Thanks again!

    D

    Monday, September 20, 2010 1:25 PM