Deep inside my WPF object **hiearchy** I create a Window object.

However, I want the **owner** of this window object to be the **base Window object**.

I've tried "climbing up the tree" with the following type of code but this approach seems **suboptimal**:

```
(((((((TabGroupPane)((ContentPane) this.Parent).Parent).Parent as
SplitPane).Parent as DocumentContentHost).Parent as 
XamDockManager).Parent as ContentControl).Parent as 
StackPanel).Parent...

```

**How can I access the base Window object?**

I'm thinking of something like this:

*PSEUDO-CODE:*

```
Window baseWindow = this.BaseParent as Window;

```