I changed the SelectedItem via a Binding. Now how do I move it into view without code-behind?
I've got a DataGrid with a Two-Way Binding on SelectedItem. I can change the SelectedItem in my ViewModel, but the DataGrid won't ScrollIntoV开发者_如何学Goiew automatically.
Is there a way to do this without using a code-behind event handler that calls ScrollIntoView(SelectedItem)
, or should I just give in and use a little code-behind?
Check http://www.codeproject.com/Tips/125583/ScrollIntoView-for-a-DataGrid-when-using-MVVM.aspx
精彩评论