diff --git a/Source/Krypton Components/.vs/Krypton Components Suite 2010/v14/.suo b/Source/Krypton Components/.vs/Krypton Components Suite 2010/v14/.suo index 8aaf588a..cb4a8d85 100644 Binary files a/Source/Krypton Components/.vs/Krypton Components Suite 2010/v14/.suo and b/Source/Krypton Components/.vs/Krypton Components Suite 2010/v14/.suo differ diff --git a/Source/Krypton Components/ComponentFactory.Krypton.Docking/Elements Impl/KryptonDockingManager.cs b/Source/Krypton Components/ComponentFactory.Krypton.Docking/Elements Impl/KryptonDockingManager.cs index 488af13b..6f42dd25 100644 --- a/Source/Krypton Components/ComponentFactory.Krypton.Docking/Elements Impl/KryptonDockingManager.cs +++ b/Source/Krypton Components/ComponentFactory.Krypton.Docking/Elements Impl/KryptonDockingManager.cs @@ -3418,6 +3418,39 @@ public virtual KryptonWorkspaceCell[] CellsWorkspace return cells.ToArray(); } } + + /// + /// Return the cell the page belongs to, when available (JDH Software add) + /// + /// The uniqueName of the page. + /// The KryptonWorkspaceCell. + public KryptonWorkspaceCell DockingCellForPage(string uniqueName) + { + //Action depends on current location of the page + switch (this.FindPageLocation(uniqueName)) + { + case DockingLocation.Docked: + // Unique name page must be inside a Dockspace instance + KryptonDockingDockspace dockspace = this.FindPageElement(uniqueName) as KryptonDockingDockspace; + // Find the cell containing the unique name page + return dockspace.CellForPage(uniqueName); + case DockingLocation.Floating: + // Unique name page must be inside a Dockspace instance + KryptonDockingFloatspace floatspace = this.FindPageElement(uniqueName) as KryptonDockingFloatspace; + // Find the cell containing the unique name page + return floatspace.CellForPage(uniqueName); + case DockingLocation.Workspace: + KryptonDockingWorkspace workspace = this.FindPageElement(uniqueName) as KryptonDockingWorkspace; + // Find the cell containing the unique name page + return workspace.CellForPage(uniqueName); + case DockingLocation.AutoHidden: + case DockingLocation.Navigator: + case DockingLocation.Custom: + case DockingLocation.None: + default: + return null; + } + } #endregion #region Protected