I have a Windows Phone 7 App with Listbox. I have created my own template selector class, that select proper datatemplate based on number of items in binded object. It works fine. But what I need, and what doesnt work fine, is when i change number of items in binded object, to reload template selector and update templates based on actual number. For example: ListItems with property x > 9 have color red, when x =< 9, color is green. When i change this number with onpage button from 8 to 9 I need to change the color. And It doesnt work. Looks like template selector is called only on navigateTo event... Help:)
I have the following line of code in my code-behind class. TabControl.ItemsSource = ((MainWindowViewModel)DataContext).TabItemViewModels; I would like to move this to the XAML file. In brief, ...