开发者

I changed the SelectedItem via a Binding. Now how do I move it into view without code-behind?

开发者 https://www.devze.com 2023-01-21 00:52 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消