Microsoft has posted a great series Windows Phone 7 Development for Absolute Beginners. However, it starts with “how to program”. This might drive you crazy if you already know how to program . Also, if you are like me and simply want the links to download the videos and the code, this should help:
In a continuation of the previous video, Bob demonstrates how to read a list of file names saved to the phone's flash drive and display those names in a ListBox. Each file name is displayed in a DataTemplate that contains a HyperlinkButton. This results in one Hyperlink button for each file name. Bob then demonstrates how to pass the file name in the QueryString to a second Silverlight page that allows the user to view the contents of the file.
Download the source code
How does your application respond when a user clicks the Start button or Back button on Windows Phone 7? In this video, Bob explains the difference between the Launched, Activated, Closed, and Deactivated events, how your application can be notified via event handlers in the App.xaml.cs code-behind file, and how to take that opportunity to save the current state of the application. Then, once the user has re-launched the applications, the state information can be retrieved and the state of the application from the previous session can be restored. Bob also explains how a special feature of Isolated Storage called IsolatedStorageSettings can provide an easy way to save name / value pair information without having to create and access a text file.
The Windows Phone 7 includes dozens of input scopes, also known as specialized keyboards that enable users to type in web addresses, chat messages, addresses, and more. Each input scope is tailored to make the given operation easier. Bob shows how to declare an input scope for an input control (like a TextBox) so that you can display the right input scope for the job.
Each Windows Phone 7 includes a Global Positioning System (GPS) that allows the phone to determine the latitude and longitude of the device. In this video, we first look at a special part of the Windows Phone 7 API to access the Geo Location information. Then, once we have the coordinates, we call a Web Service—a "method hosted on a web server," which when given the coordinates will return the city, state, and country names—and we use this to display the location of the device on screen.
In the final instructional video for Day 3, Bob covers several topics, such as using an Image for the background of a Silverlight page, how to set the supported orientations for a page, and how to use the rectangle object to provide a slightly opaque black background that allows white text to pop out from an otherwise low contrast image.
Congratulations! You made it through the instructional portion of this video series. Now let's see what you can do on your own. In this assignment, you'll build a simplified version of our note taking application. IMPORTANT: before you peek at this video, please—for your own sake—try to complete this homework assignment on your own. You'll only learn through practice, frustration, and exploration.
Got stuck with the homework assignment? No worries, simply watch enough of this solution video to get un-stuck, OR compare your solution with Bob's version. IMPORTANT: before you peek at this video, please—for your own sake—try to complete this homework assignment on your own. You'll only learn through practice, frustration, and exploration.
Today we'll be building an entire application from start to finish. The project will be a Geo-Location note taking application. As a user creates a new note, the location of where the note was composed will be saved along with the note. The user will be able to add notes, as well as edit or delete them. In this video, Bob lays out the plan for the rest of the day, including a demonstration of the application that we'll build, how we might design the application, and more.
In this first video for our Day 4 project, Bob creates a new project, adds files for the Add and EditDelete note pages, and sets some of the basic properties of each page.
Next up for our Day 4 application, we add the controls, set the properties for the MainPage.xaml, and discuss how the ListBox will work.
In this video, Bob discusses the strategy of using the file name as a means of storing the date and time the note was created, along with the location of the note’s composition. This requires quite a bit of familiarity with String and DateTime classes and their methods for formatting and parsing through data.
Now that we have and can create files with the naming convention, we want to retrieve the names of the files, parse their contents, and display them in a ListBox. In this video, Bob shows how to use the DataTemplate to display both the note's location and date in the ListBox using a HyperlinkButton and a TextBlock.
Time to move on to the next part of our Geo Location Note taking application and provide the ability for the user to add a new note. In this video, Bob adds the code required to navigate to the Add page from the MainPage.xaml, and adds both the TextBox control and Input Scope for the note.
In this video Bob uses the Day 3 example to call the TerraService passing the coordinates from the phone's GPS to the web service in order to retrieve the city, state, and country. These values are saved in a private member variable of the class, which can be used when the note is saved.
Now that we have all the parts we need, it's time to construct the file name and save the file's text. Then, we’ll navigate back to the MainPage.xaml and see the new note in the ListBox.
In this video, Bob sets up the controls required to both display and edit the note. He also adds the icons for the various features of this page, including back, edit, save, and delete buttons.
Bob wires up the navigation between the MainPage.xaml's ListBox and the ViewEdit.xaml page. In the process, we learn about the Tag property of the HyperlinkButton to store the filename of each item in the DataTemplate. Using this, a QueryString can be constructed and used to pass the file name of the desired file to the ViewEdit.xaml page.
In this video Bob uses previously discussed techniques to switch back and forth between view and edit modes by copying the content from the TextBlock to the TextBox before setting the visibility of each control. Finally, the data changes are applied to the underlying file.
Delete functionality allows a user viewing a note to delete it and return back to the list of notes. This video shows both how we enable that feature and—as Bob demonstrated on Day 3—how to display a Canvas dialog to warn the user about deleting the note.
Using the Canvas dialog technique again, Bob adds a Help dialog to the MainPage.xaml. He uses both a Button control and an icon to enable the closing of the dialog, and adds a ScrollViewer to allow more text than can fit on the screen to be presented.
Now that the majority of the functionality is complete, Bob starts hardening the application by considering what happens on each of the three Silverlight pages when the user clicks the Back or Start buttons. Using the lessons learned from the Tombstoning and Task Switching discussion on Day 3, Bob decides how to handle this situation and starts down the path, detecting the user’s location before clicking the Start or Back buttons and restoring the user to that exact state when the application is next launched.
This video continues working through the Tombstoning and Task Switching scenario, enabling the scenario for the Add.xaml page.
This video continues working through the Tombstoning and Task Switching scenario, enabling the scenario for the ViewEdit.xaml page.
In the previous video, we were left with an error, requiring that we take the time to track down the problem and fix it. This video shows the thought process behind debugging the problem and how to find the its true source.
Nearing the end of development, Bob shows how he cleans up the code and combs through it to include better code comments. He also shows where to download the Windows Phone 7 Requirements PDF, and outlines the dos and don'ts for BEFORE you attempt to submit your application for inclusion in the market place. He also replaces the icons and creates other graphic resources required by this process.
Thanks for sharing this valuable info. This would be very useful for beginners :)<br>@mvpriyank