views:

158

answers:

1

I am binding an ObservableCollection to a ListBox in Silverlight. The list can contain multiple Person or Vehicle objects which both derive from DomainObject. I would like to be able to have a different template for Person and Vehicle, but show them both in the same list. What is the best way to do this?

+2  A: 

DataTemplateSelector is not available in silverlight but there are a few resources around showing examples of how to implement it in a control.

  1. Resource 1

  2. Resource 2

Crippeoblade