I have a class called Cell with two properties. One is called Value
of type int?
And the other is called Candidates of type ObservableCollection<ObservableCollection<Candidate>>
during the initialization I am utilizing a DataTemplateSelector to choose between two datatemplates for two different scenarios.
If the Value property has a value then template A should be used to present the Cell class. However if the Value property is null Then template B should be used to present the Cell class.
While this works perfectly fine during the initialization however during the runtime the templates don't change any more when the value of the Value property actually changes.
Is the approach of using DataTemplateSelector the wrong approach to change DataTemplates dynamically? What would you recommend I should do?
Many thanks,