I have a ListView, with ListViewItem s being properly formatted using ItemTemplateSelector when the control first loads content. The data is properly coded using INotifyPropertyChanged.
My question is: How do I cause a single ListViewItem to update it's DataTemplate after the ListView has already loaded the data? I'm not sure if I need to use a setter or a task or a simple binding. Has anyone done this already?
My ListView code:
<ListView x:Name="lv_src_gStream"
ItemsSource="{Binding Source={StaticResource CVS_src_gStream}}"
PointerPressed="selectPost"
SelectionMode="None"
HorizontalContentAlignment="Stretch"
ItemTemplateSelector="{StaticResource postTemplateSelector}">
</ListView>
This works well when the data first loads, but when a variable changes, how do I get the ItemTemplateSelector to choose a different template?