首页 > 其他 > 详细

wpf TreeView

时间:2014-08-05 18:26:09      阅读:254      评论:0      收藏:0      [点我收藏+]
<Window x:Class="Mysql.DepartmentParson"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="clr-namespace:System.Collections.Generic;assembly=mscorlib"
        xmlns:local="clr-namespace:Mysql.ServiceReference1"
        Title="DepartmentParson" Height="300" Width="300">
    <Grid>
        <TreeView Name="Tree" HorizontalAlignment="Left"  Height="269"  Width="292" >
            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Value}">
                    <StackPanel>
                        <TextBlock  Text="{Binding Key.DepartmentName}" Background="Red" />
                    </StackPanel>
                    <HierarchicalDataTemplate.ItemTemplate>
                        <HierarchicalDataTemplate>
                            <TextBlock Text="{Binding Path=ParsonName}"/>
                        </HierarchicalDataTemplate>
                    </HierarchicalDataTemplate.ItemTemplate>
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>
    </Grid>
</Window>

 

wpf TreeView,布布扣,bubuko.com

wpf TreeView

原文:http://www.cnblogs.com/zhubaobao/p/3892590.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!