private void OnShowDetails(object obj) { var editWindow = new UserDetailsWindow(); var editViewModel = new UserDetailsWindowViewModel(); editViewModel.User = (User) obj; editViewModel.Closed += (sender, args) => editWindow.Close(); editWindow.DataContext = editViewModel; editWindow.Show(); }
private void OnShowDetails(object obj) { var editWindow = new UserDetailsWindow(); var editViewModel = new UserDetailsWindowViewModel(); editViewModel.User = (User)obj; editViewModel.Closed += (sender, args) => editWindow.Close(); editWindow.DataContext = editViewModel; editWindow.Show(); }