Get Row from Index in Silverlight DataGrid
问题 I am trying to implement reordering rows in a Silverlight DataGrid. For this I am extending the default DataGridDragDropTarget , and I need to override and implement the following method: protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index) { } How can I get the DataGridRow from the DataGrid and the Index? 回答1: A slight improvement on Herzmeister's answer, see comments: protected override DataGridRow ContainerFromIndex(DataGrid itemsControl, int index) { var