Windows Phone is one of the three big Smart Phone operating systems (the others are Android and the Apple IOS). If you already know how to program Windows using C# and WPF or Silverlight, you will find programming the phone pretty straightforward but highly interesting. As well as doing the usual graphical user interfaces, you can access sensor and multi-touch input.
This page is under construction
Creating Various Required Accounts
Unlike programming on windows, you need to establish several accounts that will ultimately let you register your phone for application development, and to download programs you develop on your phone.
- Sign up for a Windows Live ID account. You can use an existing account if you already signed up before.
- Register on DreamSpark. Fill out the form. Select the UofC in the field "Institution/School". Finally, click "continue to verify".
- On the next page, enter your UofC email address in order to verify your student status. Once you received the confirmation email, click the link in the email to confirm the student status.
- You now have to link your Windows Live ID to the DreamSpark account. Go to the DreamSpark Windows Phone page (direct link) and click the green button "Map your Live ID".
- On the page that opens up, enter your Windows Live ID account information. The dialog page that opens up, click "Cancel". On the webpage click "OK". Your DreamSpark and Windows Live ID accounts are now linked.
- Register an AppHub account. On the page that opens, click on "Join now - membership registration". Use your Windows Live ID (created during step 1) for this registration. Select "Student" as account type, fill out the rest of the form, and click "I accept"
- On the next page, fill out all your required personal information.
Registering your phone
You will not be able to download applications that you develop to your phone until it is registered. If you are using a Windows Phone that we gave you, we have already registered it so you can skip this step. If you are using your own phone, you must register it yourself.
- Follow all the steps above for downloading software and for creating various required accounts.
- Connect your Windows Phone via your USB cable and unlock it so that you can see the home screen.
- In the start menu, open the "Windows Phone SDK 7.1" and select the "Windows Phone Developer Registration Tool" (This would have been installed as part of the above downloads).
- Once in the registration tool, enter your Windows Live ID account and click "Register" to register the phone for development. Remember, the phone needs to be turned on and the home screen must be visible in order to unlock the device (otherwise you will get an error message).
- You can repeat step 1-3 to unlock up to 3 devices with your AppHub/WindowsLive account.
Note: You will only be able to install approximately 3 of your applications to your phone at a time. If you try to install more, you will get an error message. To remedy this, uninstall one of your applications by pressing and holding its application icon
CPSC 581 Tutorials
Tutorial 1 (Sept. 10th): GETTING STARTED
- Getting started with Visual Studio, C#, .NET, and Windows Phone programming
- Hello World application
Tutorial 2 (Sept. 12th): UI WIDGETS AND TOUCH
- Introduction to Silverlight, XAML, and Windows Phone programming (PDF, 1.1 MB)
- UI widgets, buttons, radio boxes, labels, using images, transparency loading resources
- Multi-touch events, graphics, manipulations and drawing on canvas:
Tutorial 3 (Sept. 17th): SENSORS
- Reading sensors: accelerometer:
- Using sensor readings to manipulate graphics:
- Recognizing shake events:
- Use shake events in multi-touch drawing application:
Tutorial 4 (Sept. 19th): ANIMATIONS
- Animations in silverlight: animating position of object:
- Animating objects with different easing functions, e.g., bounce back:
Tutorial 5 (Sept. 26th): Manipulations
- Another way to manage multi-touch via the Manipulation. They:
- combine the interaction of two fingers into a single action
- are an easy way to combine the movement of one or two fingers into transforms for translation and scaling
Tutorial 6 (Oct 1): Sounds
- A way to rapidly play multiple sound effects. Note that this is mostly culled from several other examples, so I am not quite sure if what I did is the best way to do it.
- uses the XNA framework, but not that complicated
- note that you need to:
- reference the XNA framework (and add the appropriate Using statements)
- add the sound (and image) files to your solution as a Resource
- for each sound, raise its context menu and mark its Build property as content
- for each image, raise its context men and mark its Build property as resource
- Download: PhoneAppSoundEffects source code, ZIP
Tutorial 7 (Oct 3): GPS and maps
- This tutorial demonstrates how to use the GPS sensor, visualize locations on a map, calculate distance between points, etc.
Other tutorials (for later):
- Data storage
- Read and save sensor readings on the device:
Tutorial 7 : Changing background images to fill
- SilverlightTapToLoad" in Chapter 4: Bitmaps, Also Known as Textures from the Windows 7 Phone book. Julia found this useful for dynamically changing the background image fill.
Tutorials and Examples
- Free programming book for Windows Phone 7 by Charles Petzold
- Online books free through UofC library:
- App Hub - Develop for Windows Phone has resources from Microsoft
- Microsoft DreamSpark provides free software to students. A valid account lets you register up to three phone for free. It also includes the Windows Phone and App Hub install which will let you develop phone applications on your own computer.
- Zune Download. Zune is required to sync your phone with your PC, and to download applications you develop from your PC to your phone.
- Microsoft Phone SDK 7.1 works with Visual Studio, if you already have it installed on your home computer. You will need it to develop phone software. Alternately, you can download the Windows Phone and App Hub developer kit from DreamSpark above, which includes Visual Studio 2010 Express.
- Microsoft SilverLight Toolkit download -the Windows Phone Toolkit contains additional controls you can use