/// ------------------------------------------------------------------------------------ public void SetActiveView(ViewTab tab) { if (tab == null) { return; } var currTab = GetSelectedTab(); if (tab == currTab) { return; } this.SetWindowRedraw(false); if (currTab != null) { if (currTab.DeactivateView(true)) { if (ViewDeactivated != null) { ViewDeactivated(this, currTab); } } else { this.SetWindowRedraw(true); return; } } EnsureTabVisible(tab); tab.ActivateView(); if (ViewActivated != null) { ViewActivated(this, tab); } this.SetWindowRedraw(true); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Gets a value indicating whether or not the first visible tab to the right of the /// specified tab is selected. /// </summary> /// ------------------------------------------------------------------------------------ public bool IsRightAdjacentTabSelected(ViewTab tab) { var adjacentTab = FindFirstVisibleTabToRight(tab); return(adjacentTab != null && adjacentTab.Selected); }