Charles Petzold



Navigating the Windows Phone 7 Documentation

May 6, 2010
New York, N.Y.

This is a subject that is not as simple as you might assume. Even if you've gone to the Windows Phone 7 portal and installed the development tools (which consist of Visual Studio 2010 Express for Windows Phone, the Windows Phone on-screen emulator, and XNA Game Studio 4.0), you're still going to need documentation and programming guides. The documentation is spread out in three separate locations in the MSDN Library, and this blog entry is a guide for finding what you need.

(By the way, Scott Hanselman recently posted a blog entry on installing a Help Viewer Power Tool for viewing documentation locally, but apparently Windows Phone 7 documentation is only available online.)

Here's the left pane of the main MSDN Library page, and if you haven't visited it recently, this is probably not what you're going to see initially. To get a good tree-view presentation of the documentation, you'll want to select the Preferences option in the upper-right corner of the screen and choose the Classic display. Otherwise when browsing the tree, much of it disappears so the context disappears as well.

 

The main section for Windows Phone 7 is under the "Development Tools and Languages" heading — not the "Mobile and Embedded Development" heading.

Here is where you'll find information for the phone in general. As you might know, you can write programs for Windows Phone 7 using either Silverlight or XNA, and the "Programming Guide" and "Class Library Reference" sections generally cover those topics that are common to both programming interfaces.

However, there is also some documentation of classes in the System.Windows.Controls and System.Windows.Navigation namespaces here that are unique to Silverlight programming.

 

To explore the documentation for XNA development for the phone, you'll want to spend a lot of time under the heading "XNA Game Studio 4.0."

However, keep in mind that this documentation also encompasses XNA programming for the Xbox 360 and the PC itself. You'll want to be particularly alert to the little "Platforms" section at the bottom of each page of documentation.

All the namespaces under the heading "Content Pipeline Class Library Reference" are only applicable to PC programming!

 

The documentation for writing Silverlight applications for Windows Phone is consolidated with the regular Silverlight 4 documentation way down in the "Web Development" section.

The ".NET Framework Class Library for Silverlight" section contains all the namespaces, classes, structures, and so forth for using Silverlight to program for web-based applications or phone applications. At the bottom of each page you'll find a "Version Information" section that indicates whether the class, structure, method, property, etc is for "Silverlight" or "Silverlight for WIndows Phone" or both.

Sometimes you'll even see the warning "Do not use when targeting Silverlight 4" — for example, for the UIElement.ManipulationStarted event or the Control.OnManipulationStarted method.

One handy feature reveals itself when you click an item in the tree-view that displays all the members (or fields or properties or events, etc) of a particular class or structure. In the displayed list, members that are supported under Windows Phone 7 are indicated by a little blue phone icon.

I've never conceived of my programming books as replacements for the official documentation. Documentation is formal, comprehensive (one hopes) and essential. But perhaps the most idiosyncratic characteristic of documentation is that it's organized alphabetically, which makes stuff easy to find (if you know the name) but in other respects is no more helpful than random. A book can only supplement the documentation but has the distinct advantage of beating a narrative path through the API jungle.

Programming Windows Phone 7 Series
Programming Windows Phone 7 Series

Free ebook to be published later this year. Preview excerpts available now.