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