private void kryptonWorkspace_ActiveCellChanged(object sender, ActiveCellChangedEventArgs e) { if (e.OldCell != null) { e.OldCell.Bar.TabStyle = TabStyle.OneNote; } if (e.NewCell != null) { e.NewCell.Bar.TabStyle = TabStyle.HighProfile; } }
private void kryptonWorkspace_ActiveCellChanged(object sender, ActiveCellChangedEventArgs e) { // Ensure all but the newly selected cell have a lower profile appearance KryptonWorkspaceCell cell = kryptonWorkspace.FirstCell(); while (cell != null) { if (e.NewCell != cell) { cell.Bar.TabStyle = TabStyle.StandardProfile; } cell = kryptonWorkspace.NextCell(cell); } // Ensure the newly selected cell has a higher profile appearance if (e.NewCell != null) { e.NewCell.Bar.TabStyle = TabStyle.HighProfile; } }
/// <summary> /// Raises the ActiveCellChanged event. /// </summary> /// <param name="e">An ActiveCellChangedEventArgs containing the event data.</param> protected override void OnActiveCellChanged(ActiveCellChangedEventArgs e) { // Ensure all but the newly selected cell have a lower profile appearance KryptonWorkspaceCell cell = FirstCell(); while (cell != null) { if (e.NewCell != cell) { cell.Bar.TabStyle = TabStyle.StandardProfile; } cell = NextCell(cell); } // Ensure the newly selected cell has a higher profile appearance if (e.NewCell != null) { e.NewCell.Bar.TabStyle = TabStyle.HighProfile; } base.OnActiveCellChanged(e); }
protected override void OnActiveCellChanged(ActiveCellChangedEventArgs e) { base.OnActiveCellChanged(e); // Ensure all but the newly selected cell have a lower profile appearance KryptonWorkspaceCell cell = FirstCell(); while (cell != null) { if (e.NewCell != cell) { cell.Bar.TabStyle = CellBarTabStyle; cell.Bar.TabBorderStyle = CellBarTabBorderStyle; } cell = NextCell(cell); } // Ensure the newly selected cell has a lower profile appearance if (e.NewCell != null) { e.NewCell.Bar.TabStyle = CellBarTabStyle; e.NewCell.Bar.TabBorderStyle = CellBarTabBorderStyle; } }