Beispiel #1
0
 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);
 }
Beispiel #2
0
 private void Delete()
 {
     var container = _container;
     _container = null;
     container.RemoveSong(this);
 }
 public PlaylistView(PlaylistViewModel viewModel)
 {
     DataContext = viewModel;
     InitializeComponent();
 }