public SongViewModel(Song song, PlaylistViewModel container) { _container = container; _model = song; Song = song.ToString(); Duration = TimeSpan.FromSeconds(_model.Duration).ToString(@"mm\:ss"); DeleteCommand = new DelegateCommand(Delete); }
private void Delete() { var container = _container; _container = null; container.RemoveSong(this); }
public PlaylistView(PlaylistViewModel viewModel) { DataContext = viewModel; InitializeComponent(); }