private void MatchingQueueCommand_Executed(object sender, ExecutedRoutedEventArgs e) { var matchingQueueVM = new MatchingQueueViewModel(); var matchingQueueWindow = new MatchingQueueWindow(matchingQueueVM); matchingQueueWindow.Owner = this; matchingQueueWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner; matchingQueueWindow.Show(); }
public MatchingQueueWindow(MatchingQueueViewModel vm) { InitializeComponent(); _matchingWorker.WorkerReportsProgress = true; _matchingWorker.WorkerSupportsCancellation = true; //_matchingWorker.ProgressChanged += ProgressChanged; _matchingWorker.DoWork += MatchWork; _matchingWorker.RunWorkerCompleted += MatchWorker_RunWorkerCompleted; _vm = vm; this.DataContext = vm; }