public Pane GetPaneFromContent(DockableContent content) { if (AttachedPane != null && AttachedPane.Contents.Contains(content)) { return(AttachedPane); } if (FirstChildGroup != null) { Pane pane = FirstChildGroup.GetPaneFromContent(content); if (pane != null) { return(pane); } } if (SecondChildGroup != null) { return(SecondChildGroup.GetPaneFromContent(content)); } return(null); }