Dialog dialog = new Dialog(){Owner = System.Windows.Application.Current.MainWindow}; dialog.ShowDialog();