Read original post by Joost van Schaik at .NET by Example
It’s really fun when someone contacts you with a Windows Phone development problem and you have already something standing by to solve it – even if it was intended for something completely different. Last week fellow MVP Mark Monster contacted me with the following situation:
- He had several objects in an ObservableCollection
- He was using a DataTemplateSelector to determine which template was to be used for an object – I assume he used something like this.
This worked very fine when initially binding the list of objects to the LongListSelector, but he ran into the following problem: the template to be used was determined by an attribute that could be changed while the object was visible [...]