void ctlToolbar_PopOut() { PopOut popOut = new PopOut(); scriptEditorGrid.Children.Remove(scriptEditor); popOut.grid.Children.Add(scriptEditor); ctlToolbar.HidePopOutButton(); popOut.ShowDialog(); popOut.grid.Children.Remove(scriptEditor); scriptEditorGrid.Children.Add(scriptEditor); ctlToolbar.ShowPopOutButton(); }