バージョン

GetPanes メソッド

XamDockManager 内のすべての ContentPane インスタンスを見つけるのに使用される列挙体を返します
シンタックス
'宣言
 
Public Function GetPanes( _
   ByVal order As PaneNavigationOrder _
) As IEnumerable(Of ContentPane)

パラメータ

order
ペインを返す順序。
使用例
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;
	}
}
参照