views:

86

answers:

1

Hi!

I have a page that is into a window similiar to MDI. I want to get the reference of the window in what the page is placed into. The window is loaded.

Thanks.

+1  A: 

I'm not 100% sure if I am understanding exactly what you mean.... if you're talking about a Windows Application that where a User Control is situated in a Window, and you want to do something to the Window from the User Control, you can simply do this (in this example it just closes the Window):

Window window = Window.GetWindow(this);
if (window != null) 
    window.Close();

If this isn't what you meant, could you please post a bit more detail.

Richard