How to set Dialog\'s position that came from .ShowDialog(); to show at the center of the mainWindows.
.ShowDialog();
This is the way I try to set position.
Just in code behind.
public partial class CenteredWindow:Window { public CenteredWindow() { InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterOwner; Owner = Application.Current.MainWindow; } }