void DataGrid_DoubleClick(object sender, RoutedEventArgs e) { Player selectedPlayer = (Player)grd_players.SelectedItem; var window = new PlayerDetail(selectedPlayer); window.Show(); }
void DataGrid_DoubleClick(object sender, RoutedEventArgs e) { ExtendedSkaterViewModel selectedPlayer = (ExtendedSkaterViewModel)grd_players.SelectedItem; var player = _draftPool.Single(x => String.Equals(x.Gamertag, selectedPlayer.Gamertag, StringComparison.OrdinalIgnoreCase)); var window = new PlayerDetail(player); window.Show(); }