Skip to content

Commit

Permalink
Merge pull request #1815 from hronlukas/master
Browse files Browse the repository at this point in the history
Do not override owner in DialogService
  • Loading branch information
brianlagunas committed Jun 5, 2019
2 parents 4551d9c + c4fa2f0 commit 428df87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Wpf/Prism.Wpf/Services/Dialogs/DialogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ void ConfigureDialogWindowProperties(IDialogWindow window, FrameworkElement dial
window.Content = dialogContent;
window.DataContext = viewModel; //we want the host window and the dialog to share the same data contex

//TODO: is there a better way to set the owner
window.Owner = Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.IsActive);
if (window.Owner == null)
window.Owner = Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.IsActive);
}
}
}

0 comments on commit 428df87

Please sign in to comment.