I have a ListView with 3 columns (User Name, Active, and Group) The ItemsSource is bound to a staticresource
ItemsSource="{Binding Source={StaticResource SortedUsers}, UpdateSourceTrigger=PropertyChanged}"
the static resource is defined as:
<CollectionViewSource x:Key="SortedUsers" Source="{Binding UsersList, UpdateSourceTrigger=PropertyChanged}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription
Direction="Ascending"
PropertyName="UserName" />
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
The user can select an item in the list and click “Modify” to change information about the user or can click an “Add” button to add a new user to the list. Both the Add and Modify use the same modal dialog to allow setup/modify of a new user. Adding a user works fine, the new user shows in the list once the modal dialog closes. however, modifying an existing user doesn’t update the data in the ListView until the window that contains the listview is closed then reopened. What do i need to do to have the ListView update for modify?
Did u try using
Although in MVVM the steps above wont be allowed.
So if the source collection (UsersList) is ObservableCollection collection view source will atomatically refresh on collection changed notifications of UsersList.
Let me know if this helps.