A Batch File For Closing Zune And Launching The Wpconnect Tool

24 Mar 2011

In a post from late last year, I looked at using a .bat file to detect the platform and launch the WPConnect tool using the path appropriate to the OS (32bit or 64 bit). I’ve since updated the batch file, which now closes the Zune software, waits a few seconds, and then attempts to use the WPConnect tool. It’s not rocket science, but it eases the burden a little when debugging on a Window Phone...

Read more

Loading Data When The User Scrolls To The End Of A List In Windows Phone 7

24 Jan 2011

Most phone users are concerned about network usage. Network traffic comes at a premium, and a user’s perception of the quality of your app depends a lot on its responsiveness. When it comes to fetching data from a network service, it should be done in the most efficient manner possible. Making the user wait while your app downloads giant reams of data doesn’t cut it. It should, instead, be done in bite-sized chunks. To make...

Read more

Refresh A Wp7 Phoneapplicationpage

05 Jan 2011

Here is a quick a dirty way to refresh a WP7 page. We use the NavigationService to navigate to the current page. There’s a catch though (in fact there are two but we’ll get to the second in a moment), we need to make a change to the Uri, else the NavigationService thinks we are trying to perform fragment navigation, which is not supported, and will raise an exception. A work-around is to tack a...

Read more

Debugging The Photochoosertask And Other Media Hub Related Tasks On Wp7

14 Nov 2010

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...

Read more

Work Around For DataContractJsonSerializer ArgumentNullExceptions

25 Oct 2010

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:...

Read more