'Declaration Public Function Contains( _ ByVal pane As DockablePaneBase, _ ByVal recursive As Boolean _ ) As Boolean
public bool Contains( DockablePaneBase pane, bool recursive )
Use this method to determine if a specific pane is located anywhere within a group. This method iterates through the panes of the group looking for a match with the pane specified. You can specify whether this method should search recursively to find nested panes, or simply examine top-level panes when searching.
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinDock Private Sub btnVisibleIndex_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnVisibleIndex.Click Dim group As DockableGroupPane = Me.ultraDockManager1.DockAreas(0) Dim pane As DockableControlPane For Each pane In Me.ultraDockManager1.ControlPanes Debug.WriteLine("Control Pane:" + pane.ToString()) Debug.Indent() ' The 'Contains' methods checks the 'Panes' of the ' group. the second argument indicates whether to ' check the children of any contained group pane. ' therefore passing in false will indicate whether ' the pane is directly contained in the panes collection If group.Contains(pane, False) Then Debug.WriteLine("Is contained directly by the first dock area") If pane.IsVisible Then Debug.WriteLine("Its visible position is " & group.Panes.GetVisiblePosition(pane)) End If ElseIf group.Contains(pane, True) Then ' While the pane is not in the Panes collection ' of the group, it is contained within the ' dock area at a deeper level Debug.WriteLine("Is a descendant of the first dock area") ' The nest depth indicates how many levels ' deep the pane is from the dock area Debug.WriteLine("The pane's current nest depth is:" & pane.NestDepth) Else Debug.WriteLine("Is not contained within the first dock area") Debug.WriteLine(String.Format("The pane is currently at index {0} of the pane {1}", pane.Index, pane.Parent)) End If Debug.Unindent() Next End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinDock; using System.Diagnostics; private void btnVisibleIndex_Click(object sender, System.EventArgs e) { DockableGroupPane group = this.ultraDockManager1.DockAreas[0]; foreach(DockableControlPane pane in this.ultraDockManager1.ControlPanes ) { Debug.WriteLine("Control Pane:" + pane.ToString()); Debug.Indent(); // The 'Contains' methods checks the 'Panes' of the // group. the second argument indicates whether to // check the children of any contained group pane. // therefore passing in false will indicate whether // the pane is directly contained in the panes collection if (group.Contains(pane, false)) { Debug.WriteLine("Is contained directly by the first dock area"); if (pane.IsVisible) Debug.WriteLine("Its visible position is " + group.Panes.GetVisiblePosition(pane)); } else if (group.Contains(pane, true)) { // While the pane is not in the Panes collection // of the group, it is contained within the // dock area at a deeper level Debug.WriteLine("Is a descendant of the first dock area"); // The nest depth indicates how many levels // deep the pane is from the dock area Debug.WriteLine("The pane's current nest depth is:" + pane.NestDepth); } else { Debug.WriteLine("Is not contained within the first dock area"); Debug.WriteLine(string.Format("The pane is currently at index {0} of the pane {1}", pane.Index, pane.Parent)); } Debug.Unindent(); } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2