WebClient/WebRequest threading untangled

WebRequest and its baby sister WebClient behave differently regarding what thread they return on. This is a short post to really clarify what returns where. Summary WebClient will always return on the UI thread if called from the UI thread WebRequest will always return on a background thread The investigation To test this I created [...]

Tags: , ,

Crafting the Øredev Windows Phone app live tile

In November last year, it was once again time for the 2011 Øredev developer conference. For the 2010 conference, we at Jayway created a schedule app with a social twist – a puzzle game that you played by talking to other participants. When updating the app this year, we decided to make use of the [...]

Tags: , ,

WP7 app update and NeutralResourcesLanguage

The Windows Phone Marketplace was updated with new features in July 2011, one has to do with default language. The previous process to submit an app required you to define the default language when submitting the app, the new version checks the default language in the uploaded xap. The problem An app created before July [...]

Tags: , , , ,

WP7 Marketplace Beta – new app downloadable delay

Have you seen the new (since fall 2011) ways to publish a Windows Phone app to Marketplace? In addition to regular publishing, you can now publish as private beta or targeted. Neither will make the app discoverable in the Marketplace, Beta is time limited and does not include the full certification requirements. MSDN has a [...]

Tags: , , , ,

Implicit styles in Windows Phone 7

Coming from WPF and Silverlight for the desktop into Silverlight for Windows Phone, which is Silverlight 3, can leave you longing for some features – one that I missed was Implicit Styles. But, with the Mango (7.1) release of WP7 we now have Silverlight 4! What are implicit styles? A style that has a target [...]

Tags: , , , ,

Fixing WP7 app not starting after project rename

If your Windows Phone 7 project isn’t starting at all – you’re not even hitting App.xaml.cs, you’ve probably renamed the app project. Fix: Set the startup object on the app project’s properties page In the .csproj file, this corresponds to the SilverlightAppEntry element: <SilverlightAppEntry>PhotoDiary.App</SilverlightAppEntry> I would call it a bug, that you cannot rename a [...]

Tags: , , , , ,

Debugging Picture Viewer App Connect on WP7

The 7.5 update for Windows Phone 7, codenamed “Mango” has finally been released to the public and adds a ton of new features both for end users as well as developers. One of these features is called App Connect. App Connect can put your app in selected places within the OS and make your app [...]

Tags: , ,

Storing double.NaN in a WP7 SQLCE database

Summary double.NaN gives me update issues (ChangeConflictException) in SQL Compact, my fallback was to set the value to zero instead: double.IsNaN(value.Altitude) ? 0 : value.Altitude where ‘Alt’ is the property on my SQLCE entity object. Of course NaN is not the same as zero – but that does not matter to me. Background For a [...]

Tags: , ,

A nice, basic log4net setup

In my current project I have need for quite a bit of logging. I’ve never used log4net before so I thought it was about time. Log4net has been around for ages, and is very well documented in the log4net documentation, and explained very nicely in e.g. Jim Christopher’s log4net tutorials. What I plan to show [...]

Tags: , ,

WP7 build error ‘Xap packaging failed’

Today my Windows Phone 7 solution started giving me one single build error: Xap packaging failed. Object reference not set to an instance of an object. Short story A file had been removed from disk but not from the solution. Always set your sample data files to Build action: None. Long story The missing file [...]

Tags: , ,

Windows Azure ServiceBus pitfalls

I’m doing a POC (Proof of Concept) with Windows Azure for a big customer. The idea is to have a web site hosted on Windows Azure where managers can enter messages. These message will then be distributed to computers on sites scattered all over the world.  A kind of a messenger service, mainly intended to [...]

Tags:

Loading data during WP7 Page navigation – the slow, the fast and the incremental

To show data to the user you have to load data and bind data – but which one is the slow part? Answer: It depends on the nature of your data and the complexity of your UI. This post will show you that data can be loaded on the UI thread or the background thread, [...]

Tags: , , ,

WP7: Right alignment bug for item templates with grids

If you have done a few templates with some of the content aligned right and other content aligned left in a grid. You have probably bumped into this. It took quite some time to solve. The problem does not exist in WPF or later versions of Silverlight, but since Windows Phone 7 is based on version 3 it’s [...]

Tags: , , ,

LowProfileImageLoader with GIF support for WP7

LowProfileImageLoader I’ve recently bumped into the need to display images from various RSS feeds in a Windows Phone 7 app. UI binding and loading of images can easily degrade the performance of any wp7 app, which led me to the excellent LowProfileImageLoader (LPIL) by David Anson. The LPIL attaches a property, UriSource, to an Image [...]

Tags: , , ,

Design/performance – WP7 in blend and code

We (Andreas Hammar and I) are just returning from Tech-Days 2011, we delivered a session on developing applications for Windows Phone 7 in Blend and code. While we were preparing for this session something stuck in our minds – when it comes to mobile applications the top priority is in design and performance. Design and [...]

Tags: , , , , ,