tags:

views:

18

answers:

1

Hey!

I'm creating a Silverlight 4 Out Of Browser application. I have my MainPage that will be the "central" application. I want to be able to display another Control next to the MainPage, by using a Popup and I want it to be displayed right next to the MainPage.

How can I get the coordinates of the upper right corner of the MainPage at each moment? (Beware that this MainPage can be moved all over the screen and hence I will need to dynamically get the corner coordinates, in order to display my popup right next to the main window).

Any thoughts on this? Thank you!!

PS: the code is in C# :-)

+1  A: 

When you say "MainPage" are you meaning MainWindow really? Silverlight doesn't have multiple window support yet.

Assuming you do mean the actual mainpage control and you want the Top/Right corner position that would be Canvas.Top and Canvas.Left properties you could get. If you posted some more XAML it might help us answer on what you are trying to do.

Tim Heuer
Thanks for the great answer - I didn't know that Silverlight doesn't support multiple windows yet...I think I'll have to give it another thought before continueing, as I was kind of based on this "multiple windows" idea.Thanks for saving me time!
Aidenn