mvvm how to make a list view auto scroll to a new Item in a list view

后端 未结 5 764
南旧
南旧 2020-12-03 05:19

I am using the MVVM pattern, I have a view which creates a new ViewModel, after the user clicks save, this view is closed and a seperate view is opened which di

5条回答
  •  执笔经年
    2020-12-03 06:06

    Add a selected item DependecyProperty to the class which contains the collection. Bind the SelectedItem of the listview to it. After adding the new model to the collection set the selected item DependencyProperty.

提交回复
热议问题