private void lvStudents_MouseDoubleClick(object sender, MouseButtonEventArgs e) { Student selectedStudent = (Student)lvStudents.SelectedItem; StudentView window = new StudentView(selectedStudent); window.ShowDialog(); }