private void AddNewSong(object parameter) { var svm = new SongViewModel(); svm.Artist = SelectedSong.Artist; svm.Id = SelectedSong.Id; svm.Title = SelectedSong.Title; Songs.Add(svm); }
private void AddNewSong(object parameter) { var svm = new SongViewModel(); svm.Artist = SongViewModel.Artist; svm.Id = SongViewModel.Id; svm.Title = SongViewModel.Title; Songs.Add(svm); }
public SongListviewModel() { songRepository = new DummySongRepository(); var songList = songRepository.ToList().Select(s => new SongViewModel(s)); SongViewModel = new SongViewModel(); Songs = new ObservableCollection<SongViewModel>(songList); AddSong = new RelayCommand(AddNewSong); }
public SongListviewModel() { songRepository = new DummySongRepository(); var songList = songRepository.ToList().Select(s => new SongViewModel(s)); SelectedSong = new SongViewModel(); Songs = new ObservableCollection <SongViewModel>(songList); AddSong = new RelayCommand(AddNewSong); }
public SongListviewModel() { songRepository = new DummySongRepository(); var songList = songRepository.ToList().Select(s => new SongViewModel(s)); SelectedSong = new SongViewModel(); Songs = new ObservableCollection<SongViewModel>(songList); ClearSong = new RelayCommand(ClearThesong, CanClearSong); DeleteSongCommand = new RelayCommand(DeleteSong, CanDeleteSong); AddSong = new RelayCommand(AddNewSong, CanAddSong); }
private void DeleteSong() { Songs.Remove(SelectedSong); SelectedSong = new SongViewModel(); }
private void ClearThesong() { SelectedSong = new SongViewModel(); }
private void AddNewSong() { var svm = new SongViewModel(); svm.Artist = SelectedSong.Artist; svm.Id = SelectedSong.Id; svm.Title = SelectedSong.Title; Songs.Add(svm); }
private void DeleteSong() { Songs.Remove(SelectedSong); SelectedSong = new SongViewModel(); }
private void ClearThesong() { SelectedSong = new SongViewModel(); }