Summer Series – Windows Phone 7 Development

This past week I attended a meeting of the Seattle Silverlight User Group. I’ve attended a number of these in the past and they have been reasonably interesting–largely a result, I think, of easy access to local Microsoft folks who are happy to speak on Silverlight topics. Currently the group is running a series on Windows Phone 7 (WP7) development, the next meeting being the third installment in that series. I attended a WP7 Quickstart event in May and found that this presentation has certainly matured a bit since then, and with the subsequent Beta release there are additional topics to talk about.

What follows are some loose notes I took during the event; this isn’t intended to give you the experience of actually being there. The featured speakers were Pete Blois, a Program Manager on Expression Blend; and Jaime Rodriguez, a Technical Evangelist for Windows Phone.

Notable tidbits that came out during the presentations:

- Pete on the yet-to-appear Pivot and Panorama controls: “Those controls are coming.”
- Jaime on future changes to the platform: “We’re not cutting a lot of things any more.”
- The Bing Maps control will not require a paid license. (Jaime)

Pete Blois
Pete demonstrated Expression Blend for Windows Phone 7. Blend for WP7 has improved quite a bit since the first release, most notable to me being the arrival of a full plate of Behaviors in the asset pane. Also new is the device tab with which you can change the theme (colors), device orientation (landscape and portrait), and whether you want to preview on the emulator or a device.

Pete did some quick demos of implementing page fly-out transitions and addressing orientation changes using Visual State Manager and Fluid Layout.

Blend also has new tooling in the properties pane for the ApplicationBar and its icons. (You’ll find that you can’t access this by selecting the ApplicationBar in the Objects and Timeline pane; you need to select the PhoneApplicationPage (the root element) and find ApplicationBar under Common Properties.) There you can adjust the colors, buttons, menu items and so on. Unfortunately we can’t use x:Name on ApplicationBar or bind to its properties; ApplicationBar is a wrapper over the native OS’ app bar–you can’t bind because it’s not a Silverlight control owned by your app.

Performance of animations can be an issue, and Pete advises using storyboards as well as render and perspective transforms–these happen on the rendering thread (which is a high priority thread). Don’t animate on width, height or layout properties, as these cause invalidation of the layout.

Jaime Rodriguez
Jaime discussed the core Silverlight controls: WP7 has those controls that make sense on the phone. Controls such as DataGrid make less sense in the mobile environment due to the lack of screen real estate. The Beta release is still missing some core controls, and tombstoning should see some improvement, but “We’re not cutting a lot of things any more.”

On the Panorama control (not in the Beta): Panorama should have 3 panels or more of content, otherwise it’s a bit silly to use it; more than 6 or 7 panels is a bit large and unwieldy. Panorama is good for exploring content, and imitates a continuous horizontal landscape that you can explore; it wraps around to the first panel if you swipe past the last one. Interestingly, Panorama does not have an app bar.

On the Pivot control (not in the Beta): it’s basically a slick tab control. Each page in the Pivot is related, but they don’t necessarily need to show the same content.

Bing maps control (not in the Beta): There will be a WP7-specific control for Bing maps. You will need to acquire and app ID to use this (as you do with Bing Maps in general) but you won’t have to pay for using the map. The map will be programmable, support gestures, and ship by RTM.

Jaime demonstrated UI navigation, especially the behavior of the back stack. I won’t get into this, as Yochay Kiriaty has a series on app activation/deactivation, tombstoning and the application execution model here.

Summary
All in all, it was a fairly informative two hours of information. I look forward to the next event on September 1st.