Пример #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();
 }