첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
유용한 소스 코드가 있으면 icodebroker@naver.com으로 보내주시면 감사합니다.
블로그 자료는 자유롭게 사용하세요.

728x90
반응형

■ TreeView 엘리먼트 사용하기

------------------------------------------------------------------------------------------------------------------------

<Grid

    xmlns:ctrl="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"

    Background="White">

    <ctrl:TreeView>

        <ctrl:TreeViewItem Header="바탕 화면">

            <ctrl:TreeViewItem.Items>

                <ctrl:TreeViewItem>

                    <ctrl:TreeViewItem.Header>

                        <ctrl:TreeViewItem Header="내 문서">

                            <ctrl:TreeViewItem.Items>

                                <ctrl:TreeViewItem>

                                    <ctrl:TreeViewItem.Header>

                                        <TextBlock

                                            Margin="2"

                                            Text="내 사진" />

                                    </ctrl:TreeViewItem.Header>

                                </ctrl:TreeViewItem>

                                <ctrl:TreeViewItem>

                                    <ctrl:TreeViewItem.Header>

                                        <TextBox

                                            Margin="2"

                                            Text="내 비디오" />

                                    </ctrl:TreeViewItem.Header>

                                </ctrl:TreeViewItem>

                            </ctrl:TreeViewItem.Items>

                        </ctrl:TreeViewItem>

                    </ctrl:TreeViewItem.Header>

                </ctrl:TreeViewItem>

                <ctrl:TreeViewItem>

                    <ctrl:TreeViewItem.Header>

                        <TextBlock

                            Margin="2"

                            Text="3,.5 플로피" />

                    </ctrl:TreeViewItem.Header>

                </ctrl:TreeViewItem>

                <ctrl:TreeViewItem>

                    <ctrl:TreeViewItem.Header>

                        <TextBlock

                            Margin="2"

                            Text="로컬 디스크(C:)" />

                    </ctrl:TreeViewItem.Header>

                </ctrl:TreeViewItem>

                <ctrl:TreeViewItem>

                    <ctrl:TreeViewItem.Header>

                        <TextBlock

                            Margin="2"

                            Text="로컬 디스크(D:)" />

                    </ctrl:TreeViewItem.Header>

                </ctrl:TreeViewItem>

            </ctrl:TreeViewItem.Items>

        </ctrl:TreeViewItem>

    </ctrl:TreeView>

</Grid>

------------------------------------------------------------------------------------------------------------------------

728x90
반응형
Posted by 사용자 icodebroker

댓글을 달아 주세요