I have one ListBox. I set its ItemSource with Collection of my custom data called Book. But Book is general type, and it has different type, like Novel, ScienceBook, etc. So what I want is to set different style for its ListBoxItem. For example: setting the red color of the title of Book if it is instance of Novel, and set the others to be blue color.
How can I achieve this in Windows Phone 7?
I have one ListBox . I set its ItemSource with Collection of my custom
Share
More elegant way is to define DataTemplateSelector to choose which
DataTemplatewill be used for which item