The Windows Phone is a different kind of phone. It’s built with you in mind, and is highly personalizable. In short, it’s a great operating system that allows for the creation of great phones like the Nokia Lumia 920, the HTC 8x and more. In this article I’ll step you through what you need to know to get started with building Windows Phone 8 apps using a Windows 8 PC.
Before you begin – please note that you will need a 64-bit version of Windows 8. Additionally, the Windows Phone 8 emulator uses Hyper-V based virtualization that requires this, and which also requires your computer to support it in via second level address translation (SLAT) on its CPU. You can find more details here: http://blogs.microsoft.co.il/blogs/stiller/archive/2012/11/19/windows_2D00_phone_2D00_8_2D00_emulator_2D00_requires_2D00_slat.aspx
You can get started with Windows Phone 8 development at the SDK download page here: http://dev.windowsphone.com/en-us/downloadsdk
Click the ‘Download’ button and the installer will launch. It may take a little while to download and install everything, including the emulation images.
It may take a couple of reboots, but when you’re done, you’ll see this tile in your Start Screen. Click it to launch the Windows Phone 8 development tools.
Upon first launch, you’ll likely see a registration dialog, from where you can continue for 30 days, or you can get unlimited use of the tools if you register for free by clicking on the link. It will take you to a questionnaire that you can use to get your registration key. Enter the key and Visual Studio Express for Windows Phone will be ready to use!
You can use the tools, with the associated emulator to build and test Windows Phone 8 applications. If you have a physical Windows 8 device, you can connect it to your PC and install and use applications on it directly. I’ll cover that in future posts. For now, we’ll look at the emulator.
From the File Menu in Visual Studio, select the ‘New Project…’ entry and you’ll see this dialog:
The central portion of the dialog shows you the type of application that the template supports. Think of a template as a short cut to building an application. So, for example, if you want to use data binding in your app, the Windows Phone Databound App will give you the basic plumbing to support this.
On the left you can see the languages that are supported in building Windows Phone 8 apps. Visual Studio supports C#, Visual Basic and C++.
For your first app, select Visual C# as the language, and Windows Phone App as the app type. Give your app a name, and press OK.
Visual Studio will ask you what Phone OS you are targeting. In this case, select the default Windows Phone 8.0 as shown here:
Press OK and Visual Studio will create the app for you, including everything you need to build, and deploy it. It gives you the design files for the user interface, built in a language called XAML, the code that activates these, and the ‘universal’ application code that wholes the app together. The app doesn’t do much at the moment, but everything you need to run it is there. At the top of the screen, find this icon:
Press it and the application will build, the emulator will launch, and the application will run in the emulator. You can see that here:
And that’s it! You now have the tools to build Windows Phone 8 applications, along with an emulator that you can test them with. In future articles I’ll go into more detail on how to build these apps, including the XAML design language, and C# for coding, as well as how to deploy and profit from your finished creations in the Windows Store!