How to position dialog.ShowMessageBox always inside the mainWindow not in centre of screen?


I have scenario in which if we resize the application I want the window to be inside of the mainWindow not in the centre of the window.
Even the alert are shown in the centre of screen, in my scenario I want to display inside the resized mainWindow.