Visual Studio/WPF > 컨트롤 > TreeView > XAML에서 정의한 문자열 표시

운영 환경
Windows 7 Pro (32bit)
Microsoft Visual Studio 2017 Community
Sublime Text 2

@ WPF 4.5 입문 by 오타 카즈키
No.3408/9985

TreeView 컨트롤의 사용 예가 소개되었습니다.
시도해 보았다.

XAML
<Window x:Class="_170421_t1510_WpfDataGridComboBox.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:_170421_t1510_WpfDataGridComboBox"
        xmlns:sys="clr-namespace:System;assembly=mscorlib" 
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">

    <TreeView>
        <TreeViewItem Header="Item3">
            <TreeViewItem Header="Item3-1">
                <TreeViewItem Header="Item3-1-4">
                    <TreeViewItem Header="Item3-1-4-1">
                        パイ
                    </TreeViewItem>
                </TreeViewItem>
            </TreeViewItem>
        </TreeViewItem>
        <TreeViewItem Header="Item2">
            <TreeViewItem Header="Item2-7">
                <TreeViewItem Header="Item2-7-1">
                    <TreeViewItem Header="Item2-7-1-8">
                        napier
                    </TreeViewItem>
                </TreeViewItem>
            </TreeViewItem>
        </TreeViewItem>
    </TreeView>
</Window>

좋은 웹페이지 즐겨찾기