+1  A: 

you would need to use DataTemplateSelector (msdn link)

jarek
+1  A: 

you can do it by using DataTemplateSelector, Check this for details about how to use DataTemplateSelector:

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/5b4db370-095e-4233-9d89-5dd8082fd474

viky