
As mentioned in the first post in this series, I am launching a series of intensive WP7 tutorials. To get started I thought it was important to revisit this earlier post and make sure all the code is up to date.
[ Note, the intent is not to suggest that writing for the phone is the same as writing for the PC; they are very different platforms (see, for example, my discussion of TransMedia) but only to demonstrate that many of the coding skills you have as a Silverlight programmer will carry over, making the learning curve a good bit flatter ]
On Thursday, August 14, John Papa will air an episode of Silverlight TV in which we examine the premise that Silverlight Programmers are instant WP7 programmers. To demonstrate this, I created two applications side by side: a traditional Silverlight (Web) application and a WP7 application using the same code. (This refresh article brings the code up to the Beta release).
Read more…

This is the fifth in a series on Templates and DataValidation.
[ First In Series Previous In Series ]
In this and the next posting I will create an application that will demonstrate how to modify the Visual State for invalid data. Along the way we will review:
- Binding form elements to data
- The binding engine and MVVM
- Using the binding engine for data validation
- Data validation and the Visual State Manager
- Using the MVVM Light Toolkit
- Best practices in application development
- Creating Child Windows
Read more…

In the comments from this morning’s post, Andrew raised two questions important enough that I wanted to answer them in a post, rather than in comments….
[In the original version of the posting] you had some code showing that you could use “=” with delegates but that you’d get a compile time error with the event keyword.
Answer: The easiest way to see this is to try it. Change the assignment of the event handler from += to = in MainPageLoaded()
Read more…

Many programmers come to Silverlight with little prior experience with C#, and thus conceptualize events as a response to an action that is “hooked up” using somewhat arbitrary syntax. All of that is fine, until it isn’t, and so this post will dive a bit deeper into Delegates and Events as core aspects of .Net languages.
Delegates
When a head of state dies, the president of the United States typically doesn’t have time to attend the funeral personally. Instead, he dispatches a delegate. Often this delegate is the vice president, but sometimes the VP is unavailable and the president must send someone else, such as the secretary of state or even the “first lady.” He doesn’t want to “hardwire” his delegated authority to a single person; he might delegate this responsibility to anyone who is able to execute the correct funeral-protocol. The president defines in advance what responsibility will be delegated (attend the funeral), what parameters will be passed (condolences, kind words, warnings to potential usurpers), and what value he hopes to get back (good will, oil). He then assigns a particular person to that delegated responsibility at “runtime” as the course of his presidency progresses. Read more…
This is the fourth in a short series on Templates and DataValidation.
[ First In Series Previous In Series ]
You will remember that in the previous post in this small series, we created a new button template with a new appearance and new behavior for the “standard” view states.
This button will be used with our form, and the form in turn will (eventually) be prepopulated from a database. It would be very convenient if the button reflected the need for the data to be saved when the user updates any of the fields. The design calls for the button’s border to turn red when the user makes any changes, and to return to normal once the changes are saved. To jazz it up a bit, let’s have the button flash green on its way back to normal.
Read more…
This is the third (if you count Sunday’s update!) in my short series on Templates and Data Validation. [ First In Series. Previous In Series ]
Today we’re going to create a templated Button that changes the appearance and visual state behavior of the button. Changing the visual state behavior in this case means responding to:
- MouseOver, by swelling
- MouseDown, by twisting and shrinking
- Disable, by fading
- Lost Focus and Get Focus (no change for this demo)
Read more…

This is the fourth in a fast paced series on programming Windows Phone 7. In this mini-tutorial I will demonstrate how absurdly easy it is to create a master page with a list of data, and a details page to display more information about the selected item, and to animate the transition from one to the other. To make it more interesting, we’ll get the list and the details from a web service, using oData.
Read more…