Version

GetPanes Method

Returns an enumerator that can be used to find all the ContentPane instances within the XamDockManager
Syntax
'Declaration
 
Public Function GetPanes( _
   ByVal order As PaneNavigationOrder _
) As IEnumerable(Of ContentPane)

Parameters

order
The order in which the panes should be returned.
Example
This example demonstrates how to use the GetPanes method to perform actions on all the ContentPanes within the XamDockManager.

Imports Infragistics.Windows.DockManager

Private ReadOnly Property AllPanes() As IEnumerable(Of ContentPane)
    Get
        ' the get panes method provides a simple enumerator for 
        ' locating all the ContentPanes within a XamDockManager. 
        ' the order parameter lets you choose how you want to 
        ' enumerate them - either based on where they are positioned 
        ' within the dockmanager or based on when they were 
        ' activated (with the most recently activated being returned 
        ' first). 
        Return Me.dmGetPanes.GetPanes(PaneNavigationOrder.VisibleOrder)
    End Get
End Property

Private Sub btnShowAll_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    For Each cp As ContentPane In Me.AllPanes
        cp.Visibility = Visibility.Visible
    Next
End Sub

Private Sub btnHideAll_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    For Each cp As ContentPane In Me.AllPanes
        cp.Visibility = Visibility.Collapsed
    Next
End Sub

Private Sub btnUnpinAll_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    For Each cp As ContentPane In Me.AllPanes
        Select Case cp.PaneLocation
            Case PaneLocation.DockedBottom, PaneLocation.DockedLeft, PaneLocation.DockedRight, PaneLocation.DockedTop
                cp.IsPinned = False
                Exit Select
        End Select
    Next
End Sub

Private Sub btnPinAll_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
    For Each cp As ContentPane In Me.AllPanes
        cp.IsPinned = True
    Next
End Sub
using Infragistics.Windows.DockManager;

private IEnumerable<ContentPane> AllPanes
{
	get
	{
		// the get panes method provides a simple enumerator for
		// locating all the ContentPanes within a XamDockManager.
		// the order parameter lets you choose how you want to 
		// enumerate them - either based on where they are positioned
		// within the dockmanager or based on when they were 
		// activated (with the most recently activated being returned
		// first).
		return this.dmGetPanes.GetPanes(PaneNavigationOrder.VisibleOrder);
	}
}

private void btnShowAll_Click(object sender, RoutedEventArgs e)
{
	foreach (ContentPane cp in this.AllPanes)
	{
		cp.Visibility = Visibility.Visible;
	}
}

private void btnHideAll_Click(object sender, RoutedEventArgs e)
{
	foreach (ContentPane cp in this.AllPanes)
	{
		cp.Visibility = Visibility.Collapsed;
	}
}

private void btnUnpinAll_Click(object sender, RoutedEventArgs e)
{
	foreach (ContentPane cp in this.AllPanes)
	{
		switch (cp.PaneLocation)
		{
			case PaneLocation.DockedBottom:
			case PaneLocation.DockedLeft:
			case PaneLocation.DockedRight:
			case PaneLocation.DockedTop:
				cp.IsPinned = false;
				break;
		}
	}
}

private void btnPinAll_Click(object sender, RoutedEventArgs e)
{
	foreach (ContentPane cp in this.AllPanes)
	{
		cp.IsPinned = true;
	}
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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

See Also