첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
<Window.Resources>
    <ResourceDictionary>
        <HierarchicalDataTemplate DataType="{x:Type local:ProjectObject}"
            ItemsSource="{Binding Path=ProjectStageCollection}" />
        <HierarchicalDataTemplate DataType="{x:Type local:ProjectStage}"
            ItemsSource="{Binding Path=TaskCollection}" />
    </ResourceDictionary>
</Window.Resources>

...

<Grid xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <dxg:TreeListControl x:Name="treeListControl">
        <dxg:TreeListControl.Columns>
            <dxg:TreeListColumn
                FieldName="Name"
                AllowSorting="True" />
            <dxg:TreeListColumn
                FieldName="Executor"
                AllowSorting="True" />
        </dxg:TreeListControl.Columns>
        <dxg:TreeListControl.View>
            <dxg:TreeListView x:Name="treeListView"
                TreeDerivationMode="HierarchicalDataTemplate" />
        </dxg:TreeListControl.View>
    </dxg:TreeListControl>
</Grid>

※ ProjectObject, ProjectStage, Task 클래스는 'TreeListControl 클래스 : HierarchicalDataTemplate를 통해 트리 구축하기'를 참조한다.

728x90
반응형
그리드형(광고전용)
Posted by icodebroker

댓글을 달아 주세요