In the XAML belonging to the Dialog:
<Window ... WindowStartupLocation="CenterOwner">
and in C# when you instantiate the Dialog:
MyDlg dlg = new MyDlg();
dlg.Owner = this;
if (dlg.ShowDialog() == true)
{
...
In the XAML belonging to the Dialog:
<Window ... WindowStartupLocation="CenterOwner">
and in C# when you instantiate the Dialog:
MyDlg dlg = new MyDlg();
dlg.Owner = this;
if (dlg.ShowDialog() == true)
{
...