/// ------------------------------------------------------------------------------------ private void MainForm_Activated(object sender, EventArgs e) { if (_viewDocked && View != null && View.Visible) { OwningTabGroup.SetActiveView(View as ITabView, false); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Moves the view's control from its form to the tab. /// </summary> /// ------------------------------------------------------------------------------------ public void DockView() { if (_undockingInProgress || _viewDocked) { return; } App.MsgMediator.SendMessage("BeginViewDocking", View); Utils.SetWindowRedraw(OwningTabGroup, false, false); Visible = true; OwningTabGroup.ViewWasDocked(this); View.Size = OwningTabGroup.ClientSize; OwningTabGroup.Controls.Add(View); View.PerformLayout(); View.BringToFront(); _viewDocked = true; _ignoreTabSelection = true; OwningTabGroup.SelectTab(this); _ignoreTabSelection = false; Utils.SetWindowRedraw(OwningTabGroup, true, true); View.Focus(); OwningTabGroup.SetActiveView(View as ITabView, false); App.MsgMediator.SendMessage("ViewDocked", View); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Make sure the global view and view type are set when an undocked view gets focus. /// </summary> /// ------------------------------------------------------------------------------------ public void m_viewsForm_Activated(object sender, EventArgs e) { OwningTabGroup.SetActiveView(View as ITabView, false); }