I\'m just creating my own AboutBox and I\'m calling it using Window.ShowDialog()
How do I get it to position relative to the main window, i.e. 20px from the top and
I would go the manual way, instead of count on WPF to make the calculation for me..
System.Windows.Point positionFromScreen = this.ABC.PointToScreen(new System.Windows.Point(0, 0));
PresentationSource source = PresentationSource.FromVisual(this);
System.Windows.Point targetPoints = source.CompositionTarget.TransformFromDevice.Transform(positionFromScreen);
AboutBox.Top = targetPoints.Y - this.ABC.ActualHeight + 15;
AboutBox.Left = targetPoints.X - 55;
Where ABC
is some UIElement within the parent window (could be Owner if you like..) , And could also be the window itself (top left point)..
Good luck