I have a service that creates/shows new RadDocumentPanes, as well as modal RadWindows. In order to set the owner of a new modal RadWindow I have code that finds the current active window to set it as the owner of the new modal RadWindow. That is easy enough if the active RadDocumentPane is docked,
RadDocumentPane ownerDocpane = MainWindowViewModel.ViewContainer.Items.OfType<RadDocumentPane>().FirstOrDefault(x => x.IsActive);
but if the pane is floating I cannot figure out how to get a reference to it.
I know that it is being hosted in a "ToolWindow", or in our case a (Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper+WindowHostWindow), but I need a way (at runtime) to find the active ToolWindow so I can populate the Owner property of the new modal RadWindow.
Any help you can give me would be appreciated!