I have a button in a toolwindow which launches a smal dialog.
I want that dialog to be centered in the toolwindow.
i tried:
myDialog.Owner = Window.GetWindow(this.ToolWindow);
myDialog.WindowStarupLocation = WindowStartupLocation.CenterOwner;
myDialog.showDialog();
This works when the toolWindow is floating and will center the dialog on the center of the owner window.
If the ToolWindow is docked, then it ends up centering on the MainWindow instead of the smaller-ToolWindow that is docked within the mainwindow.
Any idea how to do it?
I could set the Dialog's "Top" and "Left" properties, if i just had some way to get at the location i want.