public MainWindow() { InitializeComponent(); m_viewModel = new COMTRADEConverterViewModel(); m_viewModel.AddFiles(new string[] { "Drag and drop files here or use the add files button", "Double click on a file to remove it." }); DataContext = m_viewModel; }
public MainWindow() { InitializeComponent(); m_viewModel = new COMTRADEConverterViewModel(); m_viewModel.AddFiles(new string[] { "Drag and drop files here or use the add files button", "Double click on a file to remove it." }); DataContext = m_viewModel; m_worker = new BackgroundWorker(); m_worker.DoWork += m_workerDoWork; m_worker.RunWorkerCompleted += m_workerWorkDone; }
private void ClearButtonClicked(object sender, RoutedEventArgs e) { COMTRADEConverterViewModel viewModel = DataContext as COMTRADEConverterViewModel; viewModel?.ExceptionList.Clear(); }