concept null value in category silverlight

appears as: null values, null value
Silverlight 4 in Action: Silverlight 4, MVVM, and WCF RIA Services

This is an excerpt from Manning's book Silverlight 4 in Action: Silverlight 4, MVVM, and WCF RIA Services.

If Silverlight couldn’t handle the simple task of formatting values for display, binding wouldn’t be particularly useful. Luckily, Silverlight has everything you need to format display values, convert both inbound and outbound values, provide special handling for null values and even provide fallbacks for cases when binding fails. Throughout this section, you’ll see how to customize the visual representation of your data using these powerful features, several of which are new to Silverlight 4.

In many applications, a value of null truly means something different than the value of empty or zero. In the former, it means that no value has been entered. The latter indicates that a value has been entered but it’s blank or zero. To make it easier to work with, many applications disregard the null value and simply replace it with the default value for the type. This makes it easier to display in the UI, but at the cost of losing the distinction.

Starting with Silverlight 4, you can preserve the null value and still have a friendly UI. Simply provide a TargetNullValue in your binding expression: