/// <summary> /// Handler method that's called when a tab is clicked on. This is different from the <see cref="TitleBarTabs.TabSelected"/> event handler in that /// this is called even if the tab is currently active. This is used to show the toolbar for <see cref="ConnectionWindow"/> instances that /// automatically hide their toolbars when the connection's UI is focused on. /// </summary> /// <param name="sender">Object from which this event originated.</param> /// <param name="e">Arguments associated with this event.</param> private void MainForm_TabClicked(object sender, TitleBarTabEventArgs e) { // Only show the toolbar if the user clicked on an already-selected tab if (e.Tab.Content is ConnectionWindow && e.Tab == _previouslyClickedTab && !e.WasDragging) { (e.Tab.Content as ConnectionWindow).ShowToolbar(); } _previouslyClickedTab = e.Tab; }
private void OnTabClosed(object sender, TitleBarTabEventArgs e) { Debug.WriteLine("TabClosed"); }