Sunday, July 11, 2010

Silverlight on Mobile : Get Ready with the Tools and Environment

I hope with my last article you are in position to Identify and define the term “Windows Phone 7” in this large space of Mobile devices. In last article we talked about overall Mobile scenario and how Windows Phone 7 is going to place in this large business market of phones. If you feel that I am being MVP trying to say that the phone is good then its not me alone but whole world here is part of this buzz, Don’t believe this? then visit :

As we discuss in previous article that we can carry our Silverlight skills to develop applications for Windows Phone 7, though the statement is true, we still need to have certain prerequisite tools to be in place, So I request you to get those tools and be ready with the setup from here : Windows Phone Developer Tools CTP – April Refresh , We also need to keep this in mind that Version of Silverlight on Windows Phone 7 is a nearby subset of Version 3 of Silverlight, So the applications you have develop with Version 3 of Silverlight should work on Phone 7, Well due to Core OS Platform of Windows Phone 7 and .NET Compact Framework there will be some more new things as add-on to your application but basic applications build for Desktop should be in position to run on Phone 7.

Once you install Tools smoothly then just make sure you have XDE and Emulator in place like this :

SDK XDE x:\Program Files\Microsoft XDE\1.0 will be holding XDE.exe file. XDE file will allow you to run Emulator via your Command Prompt. 4 Image files there represents default skin of your phone. WPSplashScreen Image file is a loader/Splash Screen Image used. In coming days I will surely let you know how we can play around with these. WM7_Skin.xml file hold the default display location,Height and Width of the inner content area of phone like this :


As I said in earlier paragraph, XDE file is responsible to load emulator via command prompt. It comes with various switches so as to meet your needs, So you can see different options like this :

cmdlineOnce you run your emulator instance either from command line or from VS, it will look like this :

Dashboard  Menu EmulDisplay

On the left hand side you can see the Phone with 3 buttons and One menu which is shown in the middle image. If you observe carefully the middle image, you will find that Top 2 buttons are Close and Minimize, Next 2 with Arrow are actually allows you to Rotate the Device in 90 Degree angle. Other button will help to resize emulator and bottom most will allow you to configure with various display option as shown in 3rd Image, There is a Custom option as well to adjust your display of device to cater your screen resolution demands.

Windows Phone 7 have 3 buttons (Beside Camera and Power, I think in future as per vendor/Mobile Phone manufactures it may vary) as “Back”,”Start” and “Search” like this :


I will be using Microsoft Visual Studio 2010 Express for Windows Phone to Design and Develop Windows Phone 7 App.For all the necessary tools and environment I have already shared the download link above.

ExpressWP7Environment will look like this :


Once you write some code and hit F5, Emulator will load and your application will get hosted. Well, I discuss few things about loading emulator from command prompt, You may have question in mind that will I be able to load multiple emulators while one is running, Answer for this is “yes”, I mean I see this scenario from Networked based application where one app/device is talking to other. Right now let’s now talk more on this since we are yet say “Hello World” but if in future we need something like this, then all you need to host your “WM70C1.bin” file via XDE like this :

C:\Program Files(x86)\Microsoft XDE\1.0> xde “C:\Program Files (x86)\Microsoft SDKs\WindowsPhone\v7.0\Emulation\Images\WM70C1.bin” and it load another instance of emulator and it will look like this :


Well if you stuck up at some point in emulator or have some odd issues then you can check this on MSDN Forum thread.

I hope this much of basic information is more than sufficient to gear up ourselves for a long drive ahead with application development for Windows Phone 7, So next time we will say together “Hello World” and try to start looking into other various development related aspects. Hope you will like that one as well.


No comments: