Activate() public method

Makes the tab active and notifies the underlying document that it has received focus.
public Activate ( ) : void
return void
Exemplo n.º 1
0
 internal DocumentTab AddDocument(DocumentView view, string filepath = null, bool restoreView = false)
 {
     DocumentTab tab = new DocumentTab(this, view, filepath, restoreView);
     tab.Closed += (sender, e) => _tabs.Remove(tab);
     tab.Activate();
     _tabs.Add(tab);
     return tab;
 }
Exemplo n.º 2
0
 private void MainDock_ActiveDocumentChanged(object sender, EventArgs e)
 {
     if (MainDock.ActiveDocument == null) return;
     DockContent content = MainDock.ActiveDocument as DockContent;
     if (content.Tag is DocumentTab)
     {
         if (_activeTab != null) _activeTab.Deactivate();
         _activeTab = content.Tag as DocumentTab;
         _activeTab.Activate();
     }
     UpdateControls();
 }