I have a list view that has a column databound to a list.Count see below:
<ListView.View>
<GridView>
<GridViewColumn Header="Contacts" DisplayMemberBinding="{Binding Path=Contacts.Count}"/>
<GridViewColumn Header="Notes" DisplayMemberBinding="{Binding Path=Notes.Count}"/>
</GridView>
</ListView.View>
The List implements INotifyCollectionChanged. But when I add an item to the list the listview column does not get refreshed. am I doing something wrong in my binding? I can do the following:
void _Contacts_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
OnPropertyChanged("Contacts");
}
Which basically raises the PropertyChanged event of the collection. This forces wpf to rebind, but I would rather not have an abundance of events flying through my code(especially the unnecessary ones).
Any ideas?