첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
본 블로그는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 블로그 콘텐츠 향상을 위해 쓰여집니다.

728x90
반응형
728x170
using Xceed.Wpf.AvalonDock.Layout;

#region 첫번째 LayoutDocumentPane 찾기 - FindFirstLayoutDocumentPane(layoutDocumentPaneGroup)

/// <summary>
/// 첫번째 LayoutDocumentPane 찾기
/// </summary>
/// <param name="layoutDocumentPaneGroup">LayoutDocumentPaneGroup</param>
/// <returns>LayoutDocumentPane</returns>
public LayoutDocumentPane FindFirstLayoutDocumentPane(LayoutDocumentPaneGroup layoutDocumentPaneGroup)
{
    LayoutDocumentPane layoutDocumentPane = null;

    foreach(ILayoutDocumentPane layoutDocumentPaneInterface in layoutDocumentPaneGroup.Children)
    {
        if(layoutDocumentPaneInterface is LayoutDocumentPane)
        {
            return layoutDocumentPaneInterface as LayoutDocumentPane;
        }

        if(layoutDocumentPaneInterface is LayoutDocumentPaneGroup)
        {
            layoutDocumentPane = FindFirstLayoutDocumentPane(layoutDocumentPaneInterface as LayoutDocumentPaneGroup);

            if(layoutDocumentPane != null)
            {
                return layoutDocumentPane;
            }
        }
    }

    return null;
}

#endregion

#region 첫번째 LayoutDocumentPane 찾기 - FindFirstLayoutDocumentPane(layoutPanel)

/// <summary>
/// 첫번째 LayoutDocumentPane 찾기
/// </summary>
/// <param name="layoutPanel">LayoutPanel</param>
/// <returns>LayoutDocumentPane</returns>
public LayoutDocumentPane FindFirstLayoutDocumentPane(LayoutPanel layoutPanel)
{
    LayoutDocumentPane layoutDocumentPane = null;

    foreach(ILayoutPanelElement layoutPanelElementInterace in layoutPanel.Children)
    {
        if(layoutPanelElementInterace is LayoutDocumentPane)
        {
            return layoutPanelElementInterace as LayoutDocumentPane;
        }

        if(layoutPanelElementInterace is LayoutDocumentPaneGroup)
        {
            layoutDocumentPane = FindFirstLayoutDocumentPane(layoutPanelElementInterace as LayoutDocumentPaneGroup);

            if(layoutDocumentPane != null)
            {
                return layoutDocumentPane;
            }
        }
    }

    return null;
}

#endregion
728x90
반응형
그리드형
Posted by 사용자 icodebroker
TAG , , ,

댓글을 달아 주세요