“One mans journey converting http://FromTheMalverns/Spot from a Silverlight Desktop App to a Windows Mobile 7 App hosted in the market place.
UPDATE: Having now caught up with some of the MIX sessions I would advise that the best way to manage a Desktop SIlverlight and WP7 App is together, in the same solution file using shared code. For more information on this check out sessions CL16 and CL17 from Mix10 available here.
- I created an empty WP7 app using Visual Studio Express for WP7
- Copy and paste all items from desktop app (in the file system)
- Imported all the desktop items into the WP7 app
- Refactored all the namespaces (not strictly necessary if you decide to keep the same namespace)
Minor Issues I hit:
- I had to delete the target elements from the Hyperlink controls as these are not supported in WP7 (see below)
- I don’t have as many pixels as I though (I designed for 800×480 but the app is being cropped in the emulator? (turns out I had a margin set incorrectly!)
- Sounds not playing?
* While the links remained after removal of he target attribute when selecting them in the emulator I get the following message (would have been nice top get the message in landscape mode, no doubt we will by the time we get to prod)
- I added an extra line to let the phone know that I only support landscape Mode (SupportedOrientations= Supportedorientations.Landscape)
- I’ve added a call top the VibrateController for a quick ‘buzz’ each time a difference is found.
- Obviously the design of the app predated the guidelines and opportunities that the phone platform provides. (I plan on reviewing the design once I have the functionality sorted out).
And that was enough to get the app up and running on my (emulated) phone!!
Huzzah! But wait. I move my finger on the phone emulator, the magnifying glass moves CHECK. I find a difference and tap with a second finger OOPS nothing.So question now is:
- Does the emulator support multitouch? (My Laptop supports 2 touch points)
- Is my code for multitouch incorrect? (it worked on my Silverlight desktop OK)
I will update this post when I have the answer.
And here is that answer from the excellent free Peltzoid book:
Touch Events in Silverlight rlight 3, you know about the Touch.FrameReported event. In Windows Phone 7 Series programming, that event has become obsolete. ManipulationStarted, ManipulationInertiaStarting, ManipulationDelta, and ManipulationCompleted. These events are so sophisticated in incorporating concepts of velocity and inertia that they really acquire a ManipulationStarted just to detect …
Apart from that issue … very impressed so far!