Debugging The Photochoosertask And Other Media Hub Related Tasks On Wp7
Using the device debugger is a snap in Windows Phone 7. There are many benefits, and you can see your app executing in a real world environment, with most of the launchers and choosers available for testing. Some choosers, however, rely on the Windows Phone Media Hub; such as the PhotoChooserTask. Trying to debug across a call to that bad boy, with the Zune software running, will lock up your app. Fortunately there’s an easy...
Work Around For DataContractJsonSerializer ArgumentNullExceptions
If you’ve tried using a DataContractJsonSerializer or a DataContractSerializer with Push Notification for the Windows Phone, you may have experienced an ArgumentNullException during deserialization. This can happen because the MemoryStream is buffered with null characters ‘\0’ that prevent deserialization. A solution is to create a new array and copy all bytes except for the trailing nulls, as shown in the following excerpt from the downloadable sample code in my upcoming book, Windows Phone 7 Unleashed:...
Netflix Wp7 Browser
My wife, Katka, has published a great new article
Learn how to use the Pivot and Panorama controls, page navigation, OData and more!
Conquering ReaderWriterLockSlim Mismatched Enter And Exit Calls
The ReaderWriterLockSlim class is used to protect a resource that is read by multiple threads and written to by one thread at a time. The class exists in the desktop FCL, but is noticeably absent from the Silverlight FCL. To readily support both platforms, some time ago, I incorporated the open-source mono implementation of the ReaderWriterLockSlim class into the Silverlight version of my core library, which is downloadable from http://calcium.codeplex.com/SourceControl/list/changesets ReaderWriterLockSlim is a light-weight alternative...
Enforcing Single Instance Wpf Applications
Introduction Today the WPF Disciples, and in particular my good friend and fellow WPF Disciple, Pete O’Hanlon, were sitting around the proverbial campfire, discussing how to enforce single instance WPF apps, for Pete’s cool Goldlight project. By single instance WPF apps, I mean limiting an executable to only one instance in execution. This can be useful in scenarios where multiple application instances may play havoc with shared state. I took some time away from writing...