concept displaymemberpath in category silverlight

appears as: DisplayMemberPath
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.

The ItemsSource property can only be used if the Items collection of an ItemsControl is empty. If the Items collection isn’t empty, your application will throw an InvalidOperationException when you try to set the ItemsSource property. If you intend to use this property, you should also consider using the DisplayMemberPath property.

The DisplayMemberPath property determines which CLR property value to use for the text of a list item. By default, each list item will use the ToString method of the object it’s bound to for the display text—the reason each of the items in listing 11.5 is shown as MyLibrary.Emoticon. You can override the ToString method to fully customize the text shown for an item. If you want to go a step further, you can customize the entire look of an item using the data template information discussed in section 11.3.2. But, for the quickest approach, you can use the DisplayMemberPath as shown in listing 11.7.