Microsoft Virtual Academy
Get 50% off eBooks plus
40% off print books at
The Microsoft Press Store
Bob Tabor and Clint Rutkas team up to deliver this 11+ hour Windows Phone 8 Development for Absolute Beginners series! Not only will you learn the absolute basics of installing and working with Visual Studio Express 2012 for Windows Phone and the Emulator, but you'll also learn XAML layout and events, how to utilize many of the Phone's built in features and additional open-source libraries. Best of all, this series will walk you through building two complete store-worthy apps. The first app you'll build is the SoundBoard app that allows you play pre-recorded sounds and record your own custom sounds. The second app you'll build is the AroundMe app which integrates the Phone's Map, GPS and Lock Screen capabilities with Flickr's API.
Instructors | Bob Tabor -LearnVisualStudio.Net; Clint Rutkas - Microsoft Technical Evangelist; Dan Fernandez - Microsoft Senior Director
According to the title of this series, this training is for "absolute beginners", and while that is definitely true—we will begin with the very basics of building phone apps—you'll see that we quickly move into utilizing some of the new and advanced features on the Windows Phone 8 operating system. If you are a beginner programmer watching the C# Fundamentals course first will be helpful. Follow this link to see the latest updates or to leave feedback.
Before you can develop a Windows Phone 8 app, you'll need to install the Windows Phone 8 SDK (Software Development Kit) on a computer running Windows 8 64-bit edition. The reason for this requirement is the Windows Phone Emulator ... it is running as a virtual machine in Hyper-V, Microsoft's virtualization platform. So, you'll be running the Windows Phone 8 operating system in a window that looks like a real phone, on your desktop for the purpose of testing your work. Follow this link to see the latest updates or to leave feedback.
Now that we have the tools we need installed, we can build our first Windows Phone 8 app. This module contains creating a new Windows Phone App project, simple edits, like removing comments and adding a MediaControl, Button control that we'll style it up, write an event handler that will respond to the click event of the Button and more. Follow this link to see the latest updates or to leave feedback.
In this lesson, I want to talk about the XAML syntax we wrote in our first pass at the SoundBoard app. Hopefully you could see how the XAML we wrote impacted what we saw in the Phone preview pane. It's relatively easy to figure out the absolute basics of XAML just by looking at it, but I want to point out some of the features and functions that may not be obvious at first glance. Follow this link to see the latest updates or to leave feedback.
In this lesson I want to talk about layout, or in other words, how controls are positioned and arranged on your app's user interface. Follow this link to see the latest updates or to leave feedback.
With the basics of XAML, layout and events in place, let's do something fun. We'll give some unique character to the app by styling it. Obviously we'll want to follow Microsoft's guidelines so that our app looks like it belongs as part of the Windows Phone 8 ecosystem, however we still have a lot of latitude on how we can personalize our app. Follow this link to see the latest updates or to leave feedback.
In this lesson I'll explain how to localize your app ... that simply means that we can present the various bits of text in your app in different languages. For example, I may want to support both English speakers and Spanish speakers opening up the number of markets I could potentially sell my app in. Now, there's a bit more to selling in different markets than merely localizing my app, however this would be a big step in the right direction. Follow this link to see the latest updates or to leave feedback.
In this lesson, I want to talk about deploying the app we build to a physical device running the Windows Phone 8 Operating System. Up until now, we've merely deployed to the Phone Emulator. The compilation and deployment step is automated for us, and we may not be aware of how the program is packaged and installed into the Emulator. Furthermore, we will want to understand the way in which the app is packaged because we'll want to undoubtedly deploy the app to a physical phone device for testing, and we'll want to package the app so that we can submit it to the Windows Store to be approved and included there for download or sale. Follow this link to see the latest updates or to leave feedback.
We've seen the Windows Phone Emulator at work in this series. It is a crucial component to developing apps for the Windows Phone platform, so I wanted to spend a little time becoming more familiar with it and point you in the right direction for more information. Follow this link to see the latest updates or to leave feedback.
In this lesson I want to review two project templates to learn a bit more about what they can do and in so doing, determine if there's a fit between their built-in capabilities and my needs for a new SoundBoard app. Follow this link to see the latest updates or to leave feedback.
The PetSounds app was a nice way to learn about playing media, but we have commercial aspirations with our app. So, in this lesson we'll sit down and think about designing and developing a more robust version of PetSounds -- a sound board app with many different types of categories of sounds, and perhaps even the ability to record your own sounds. Follow this link to see the latest updates or to leave feedback.
Now that we've completed the basic setup chores, we want to focus on the heart of the application: the data model. This requires we translate our low-tech mockups from the previous lesson into a viable data model that best represents the data and hierarchical relationships between the data. Follow this link to see the latest updates or to leave feedback.
In the previous lesson, we made a lot of progress in wiring up a new data model to the MainPage.xaml and now we need to focus on the layout of the DataTemplate in our LongListSelector—we'll want to tweak each instance of the SoundData so that they resemble tiles instead of rows. So, if we compare our drawings with the current state of the app's UI, the layout is not quite right. We'll remedy that in this lesson. Follow this link to see the latest updates or to leave feedback.
Now, in this lesson, we want to turn our attention to binding to real data at Runtime. Follow this link to see the latest updates or to leave feedback.
Now that we have our data model loaded with live data, not the least of which is the path to the sound files, actually PLAYING those sounds is relatively easy. Follow this link to see the latest updates or to leave feedback.
Our app works great as a simple SoundBoard, but we want to push the envelop and enable custom sounds—sounds that the user can record and re-use. This will require a few changes to our app ... in this lesson, we'll add an Application Bar with a Record button. When the user clicks it, we'll navigate the user to a new XAML page where they can record new custom sounds. Follow this link to see the latest updates or to leave feedback.
Recording a custom sound in our app would be difficult to code by hand. Fortunately, your friends at Coding4Fun, and Clint Rutkas specifically, have created a Toolkit for Windows Phone that hides the complexity behind easy to use programmatic interfaces. If you're not familiar with Coding4Fun, it's a Channel9 site that engages in geeky cool projects, not your standard business apps ... they usually use hardware like the Kinect as the interface for controlling things such as boxing robots and even a Ford Mustang that was heavily modified with Microsoft technology ... just to prove that it could be done. Follow this link to see the latest updates or to leave feedback.
When someone clicks the microphone icon in our app bar, we want to take them to a new page where we can allow them to record a custom sound. To do this, we need to create a second page in our app, and then navigate from the MainPage.xaml to that new page. Navigation in Windows Phone Apps is similar to navigating from one web page to another. In this lesson, we'll learn about the Navigation API and, even though our needs are simple in this particular app, we'll find out the Navigation API capabilities with regards to how the Windows Phone 8 operating system re-hydrates apps shut down due to memory constraints. Follow this link to see the latest updates or to leave feedback.
Now that we can navigate to the new RecordAudio.xaml page, it's time to focus on the layout of this page. If you'll recall from our low-tech UI sketches, we envisioned a simple reel image that would rotate to indicate that the app was recording. There would be a button to start the recording process and a button to play back the sound. Finally, there would be an app bar to save the sound and give it a name. In this lesson, we'll get started by laying out the page and worry about the audio recording functionality and the animation later. Follow this link to see the latest updates or to leave feedback.
In this lesson we'll write the code required to record the custom sound. We'll employ the Coding4Fun Toolkit to help make this easier, but we'll still need to understand things like MemoryStreams and the phone's IsolatedStorage. Follow this link to see the latest updates or to leave feedback.
At this point, we are recording audio and saving it to a temp file on the app's IsolatedStorage. Next, we need to allow the user to permanently save the sound providing details like the display name for the new custom sound. Follow this link to see the latest updates or to leave feedback.
The final step will be fun ... we'll animate the reel object on our record audio screen. We want it to rotate as we're recording ... that's a nice visualization of what the app is doing, a nice visual cue to the user that they are in the middle of an important operation with the app. Follow this link to see the latest updates or to leave feedback.
In this lesson we will perform some compliance testing to make sure our app has a chance to be included in the Store and submit our app to the store. Follow this link to see the latest updates or to leave feedback.
Now that we've finished our first app, let's move on to building a second app. This time let's build an app that is both location-aware and social in nature... so, it will use the Phone's GPS to determine where the current user is standing, and then use the latitude and longitude to search for photos that others have taken within a few meters of where the user is standing. Follow this link to see the latest updates or to leave feedback.
In the previous lesson I was able to hardcode a GeoCoordinate object and pass it to the Map control to set it's position. However, for our app, we will want to retrieve that information from the phone. The Windows Phone API has a Geolocator class that will use the phone's GPS system to determine where in the world it is. Follow this link to see the latest updates or leave to feedback.
In this lesson we'll search for Flickr photos near the geocoordinate determined by our phone. Many of the most popular phone apps have some interaction with web-based services ... so the app allows users to get at their own data that they've stored "in the cloud", or they provide access to data in order to make it available in some fresh new way. Follow this link to see the latest updates or to leave feedback.
Now we have a map and a single image returned from Flickr, we have the basic building blocks for our app. But our eventual aim is to show a list of images instead of just one. So, in this lesson we'll do that by adding a SearchResults page and displaying all the images returned by our search. Follow this link to see the latest updates or to leave feedback.
In this lesson, I want to talk about the keywords we've added to several spots in our source code. The keywords I'm referring to are: async, await and Task. Follow this link to see the latest updates or to leave feedback.
Currently, we can find all images on Flickr based on the locale of the device, however in our original "low tech mockup" design, we wanted to allow the user to filter the results by a keyword or search phrase. We'll enable that feature in this lesson. Follow this link to see the latest updates or to leave feedback.
When our app launches, it will need to ascertain the current GPS position and update the Map control. That could take a little and we want to give the user of our app some visual feedback that all is fine and the application is still working. Follow this link to see the latest updates or to leave feedback.
Our ultimate vision for the app is to allow the user to select one or more photos. We'll add a reference to the Windows Phone toolkit so that we can utilize the LongListMultiSelector, an improved version of the LongListSelector we've been using that allows a user to make multiple selections in the list. Also we'll convert our LongListSelector to a LongListMultiSelector and add attributes to its definition to enable its unique functionality. Follow this link to see the latest updates or leave to feedback.
In this lesson we'll refine our search results page by animating the images as they are loaded from Flickr. We want the images to ease in, fade in to view. We also want to provide feedback to the user of the app for long running operations like retrieving these photos over a slow internet connection by adding a progress indicator. And finally, I want to add some feedback in case the user searches their current location and topics and Flickr has no results to return ... we don't want to leave the user in the dark waiting for photos to appear that never come. Follow this link to see the latest updates or to leave feedback.
Our app is coming together nicely, but there's one last feature we want to implement. When the user selects one or more Flickr images in the LongListMultiSelector, we'll take the FlickrImage data and serialize it to disk using JSON. In this first pass, we'll randomly select one of those FlickrImage instances as the lock screen image once. Then in the next lesson, we'll randomly select from that list of serialized FlickrImages once every 30 minutes, which is ultimately our goal. Follow this link to see the latest updates or to leave feedback.
Congratulations, you made it to the end of another video series. That's no small task—it took a lot of commitment to do that, not to mention time and attention, but hopefully you enjoyed the series and were compiling ideas for building your own apps and gaining confidence—not to mention the knowledge of the API, the techniques for working in the Visual Studio IDE and the Phone Emulator, and so on. Follow this link to see the latest updates or to leave feedback.