/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { if (location == DockingLocation.Workspace) { KryptonPage page = DockableWorkspaceControl.PageForUniqueName(uniqueName); if (page is KryptonStorePage) { return(this); } } return(null); }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { if (location == DockingLocation.Floating) { KryptonPage page = FloatspaceControl.PageForUniqueName(uniqueName); if ((page != null) && (page is KryptonStorePage)) { return(this); } } return(null); }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { if (location == DockingLocation.Navigator) { KryptonPage page = DockableNavigatorControl.Pages[uniqueName]; if (page is KryptonStorePage) { return(this); } } return(null); }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { if (location == DockingLocation.AutoHidden) { KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if (page is KryptonStorePage) { return(this); } } return(null); }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public virtual IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { // Default to not finding the element IDockingElement dockingElement = null; // Search all child docking elements for (int i = 0; i < Count; i++) { dockingElement = this[i].FindStorePageElement(location, uniqueName); if (dockingElement != null) { break; } } return(dockingElement); }
/// <summary> /// Find the docking location of the named page. /// </summary> /// <param name="uniqueName">Unique name of the page.</param> /// <returns>Enumeration value indicating docking location.</returns> public virtual DockingLocation FindPageLocation(string uniqueName) { // Default to not finding the page DockingLocation location = DockingLocation.None; // Search all child docking elements for (int i = 0; i < Count; i++) { location = this[i].FindPageLocation(uniqueName); if (location != DockingLocation.None) { break; } } return(location); }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { if (location == DockingLocation.Docked) { KryptonPage page = DockspaceControl.PageForUniqueName(uniqueName); if ((page != null) && (page is KryptonStorePage)) return this; } return null; }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public virtual IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { // Default to not finding the element IDockingElement dockingElement = null; // Search all child docking elements for (int i = 0; i < Count; i++) { dockingElement = this[i].FindStorePageElement(location, uniqueName); if (dockingElement != null) break; } return dockingElement; }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { if (location == DockingLocation.AutoHidden) { KryptonPage page = AutoHiddenGroupControl.Pages[uniqueName]; if ((page != null) && (page is KryptonStorePage)) return this; } return null; }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="uniqueName">Unique name of the page to be found.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public override IDockingElement FindStorePageElement(DockingLocation location, string uniqueName) { // Cannot replace a null reference if (uniqueName == null) throw new ArgumentNullException("uniqueName"); // Unique names cannot be zero length if (uniqueName.Length == 0) throw new ArgumentException("uniqueName cannot be zero length"); return base.FindStorePageElement(location, uniqueName); }
/// <summary> /// Find the docking element that contains the location specific store page for the named page. /// </summary> /// <param name="location">Location to be searched.</param> /// <param name="page">Reference to page.</param> /// <returns>IDockingElement reference if store page is found; otherwise null.</returns> public IDockingElement FindStorePageElement(DockingLocation location, KryptonPage page) { // Cannot find a null reference if (page == null) throw new ArgumentNullException("page"); return FindStorePageElement(location, page.UniqueName); }