John Papa and Glen Block have recently posted on a topic that touched home for me. They put together a solution to find view models for a given view in a view-first fashion to support Blendability and a clean MVVM presentation pattern. Funny, I put this very pattern together last week after being motivated by what I saw from Rob Eisenberg and Laurent Bugnion at MIX the week before. I too came to the conclusion that it makes a lot of sense to go with a View-first approach if you’re going to make Blend a first class citizen in your...
Here’s a handy Extension Method in C# that attaches a “ToXml()” method to any and all object instances. I added the capability to dictate whether or not to use the classic XmlSerializer or the DataContractSerializer that came to us with WCF. I made the XmlSerializer the default because typically, when I’m doing this programmatically in my code, it’s intended for human eyes and the XmlSerializer is far more readable, but the DataContractSerializer is what’s actually used at runtime by WCF. So, call the overload the matters to you. public static string...