private void ShowPage(NavigatorPage page) { // get the control to show Control toShow = (Control)_component.GetPageView(page).GuiElement; // hide all others foreach (Control c in _contentPanel.Controls) { if (c != toShow) { c.Visible = false; } } // if the control has not been added to the content panel, add it now if (!_contentPanel.Controls.Contains(toShow)) { toShow.Dock = DockStyle.Fill; _contentPanel.Controls.Add(toShow); } toShow.Visible = true; // HACK: for some reason the error provider symbols don't show up the first time the control is shown // therefore we need to force it if (toShow is ApplicationComponentUserControl) { (toShow as ApplicationComponentUserControl).ErrorProvider.UpdateBinding(); } // set the title and selected tree node _titleBar.Text = page.Path.LastSegment.LocalizedText; _treeView.SelectedNode = _nodeMap[page]; }