1

I have been looking to find a way to spawn a WPF window in a location specific to its owner. I want the window to spawn on the top left corner of the owner. Is it possible? If so then how can this be achieved?

Just to clarify the scenario, i am developing a tool in WPF which is executed using a c++ dll (using ShellExecuteA)

Thanks.

Master.Aurora
  • 908
  • 2
  • 11
  • 26

1 Answers1

1

You can try this by setting the Position via Code.

myWindow.Left = myWindow.Owner.Left;
myWindow.Top = myWindow.Owner.Top;
Sukram
  • 456
  • 3
  • 16
  • Thank you for your reply. But i am in a situation whereby i have no access to the owner window. Another application starts my application. – Master.Aurora Nov 02 '12 at 11:44
  • ok, may be this [post](http://stackoverflow.com/questions/1364440/how-to-get-and-set-window-position-of-another-application-in-c-sharp) will help you. It is about getting a window position of another-application – Sukram Nov 02 '12 at 12:14