public DownloadedViewModel(IUnityContainer container, IDownloaderManager downloaderManager) : base(container) { _downloaderManager = downloaderManager; EmptyAllRecordCommand = new RelayCommand( () => { AcceleriderUser.GetCurrentNetDiskUser().ClearDownloadFiles(); TransferredFiles.Clear(); }, () => TransferredFiles?.Any() ?? false); EventAggregator.GetEvent <TransferItemCompletedEvent>().Subscribe( item => TransferredFiles.Add(item), Prism.Events.ThreadOption.UIThread, true, _ => TransferredFiles != null); }