void ReportWindow_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { ReportWindow window = sender as ReportWindow; if (window != null && window.IsVisible == true) { this.CreateReport(); } else { this.Close(); } } private void CreateReport() { this.reportThread = new Thread(delegate() { DoReport(MainDataPK); }); this.reportThread.Start(); } private void DoReport(int tasPK) { Report report = (new RptValPro()).GetReport(tasPK); this.Dispatcher.Invoke(DispatcherPriority.Send, (Action)delegate { this.EndReport(report); }); } private void EndReport(Report report) { this.ReportDocument = report; }Then when the Report is created then the EndReport(Report report) method is Invoked and a public Report property is set to the generated report.