private async void menuitemErrorReports_Click(object sender, RoutedEventArgs e) { List <DeviceInsightModel> deviceInsightModels = new List <DeviceInsightModel>(); Cursor = Cursors.Wait; try { ModelManager modelManager = ModelManager.GetInstance(); deviceInsightModels = await modelManager.GetDeviceInsightModels(this.CurrentTenantModel); } finally { Cursor = null; } var dialog = new ErrorReportsWindow(); dialog.Owner = this; dialog.DeviceInsightModels = deviceInsightModels; var dialogResult = dialog.ShowDialog(); dialog = null; }