첨부 소스 코드는 나눔고딕코딩 폰트를 사용합니다.
728x90
반응형
728x170
<Window.Resources>
    <DataTemplate x:Key="NoteDataTemplateKey">
        <Border>
            <TextBlock
                TextWrapping="Wrap"
                Text="{Binding Path=Note}" />
        </Border>
    </DataTemplate>
</Window.Resources>

...

<dxg:GridControl x:Name="gridControl"
    AutoGenerateColumns="AddNew">
    <dxg:GridControl.View>
        <dxg:TableView
            ShowGroupPanel="False"
            AutoWidth="False"
            DetailHeaderContent="Employee" />
    </dxg:GridControl.View>
    <dxg:GridControl.DetailDescriptor>
        <dxg:TabViewDetailDescriptor>
            <dxg:TabViewDetailDescriptor.DetailDescriptors>
                <dxg:DataControlDetailDescriptor ItemsSourcePath="OrderList">
                    <dxg:DataControlDetailDescriptor.DataControl>
                        <dxg:GridControl AutoGenerateColumns="AddNew">
                            <dxg:GridControl.View>
                                <dxg:TableView
                                    ShowGroupPanel="False"
                                    AutoWidth="False"
                                    DetailHeaderContent="Order" />
                            </dxg:GridControl.View>
                        </dxg:GridControl>
                    </dxg:DataControlDetailDescriptor.DataControl>
                </dxg:DataControlDetailDescriptor>
                <dxg:ContentDetailDescriptor
                    ContentTemplate="{StaticResource NoteDataTemplateKey}"
                    HeaderContent="Note">
                </dxg:ContentDetailDescriptor>
            </dxg:TabViewDetailDescriptor.DetailDescriptors>
        </dxg:TabViewDetailDescriptor>
    </dxg:GridControl.DetailDescriptor>
</dxg:GridControl>

※ xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid

※ Order, Employee, 클래스는 WPF 프로그램 자료집의 'How to : Setup Simple Tabbed Details'를 참조한다.

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

댓글을 달아 주세요