private void UpdateCellSettings() { KryptonWorkspaceCell cell = FloatspaceControl.FirstVisibleCell(); if (cell != null) { // If there is only a single cell inside the floating window if (FloatspaceControl.CellVisibleCount <= 1) { // Cell display mode depends on the number of tabs in the cell cell.NavigatorMode = cell.Pages.VisibleCount == 1 ? NavigatorMode.HeaderGroup : NavigatorMode.HeaderGroupTab; } else { do { // With multiple cells we always need the tabs showing cell.NavigatorMode = NavigatorMode.HeaderGroupTab; cell = FloatspaceControl.NextVisibleCell(cell); }while (cell != null); } } // Only show the floating window if there is a visible cell Visible = (FloatspaceControl.CellVisibleCount > 0); }
private IReadOnlyList <string> VisibleCloseableUniqueNames() { var uniqueNames = new List <string>(); KryptonWorkspaceCell cell = FloatspaceControl.FirstVisibleCell(); while (cell != null) { // Create a list of all the visible page names in the floatspace that are allowed to be closed uniqueNames.AddRange(from page in cell.Pages where page.LastVisibleSet && page.AreFlagsSet(KryptonPageFlags.DockingAllowClose) select page.UniqueName); cell = FloatspaceControl.NextVisibleCell(cell); } return(uniqueNames); }
private string[] VisibleCloseableUniqueNames() { List <string> uniqueNames = new List <string>(); KryptonWorkspaceCell cell = FloatspaceControl.FirstVisibleCell(); while (cell != null) { // Create a list of all the visible page names in the floatspace that are allowed to be closed foreach (KryptonPage page in cell.Pages) { if (page.LastVisibleSet && page.AreFlagsSet(KryptonPageFlags.DockingAllowClose)) { uniqueNames.Add(page.UniqueName); } } cell = FloatspaceControl.NextVisibleCell(cell); } return(uniqueNames.ToArray()); }