Home » C# » Code C#: Thêm Ellipse, TextBlock vào cây (Tree)
Code C#: Thêm Ellipse, TextBlock vào cây (Tree)
Người đăng: culaoxanh88 on Chủ Nhật, 9 tháng 6, 2013
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
HorizontalAlignment="Center" VerticalAlignment="Center">
<TreeView>
<TreeViewItem Header="A" IsExpanded="True">
<TreeViewItem Header="B" />
<TreeViewItem Header="C" IsExpanded="True">
<TreeViewItem Header="D" />
<TreeViewItem Header="E" />
</TreeViewItem>
<TreeViewItem Header="F" />
</TreeViewItem>
<TreeViewItem IsExpanded="True">
<TreeViewItem.Header>
<StackPanel Orientation="Horizontal">
<Ellipse Fill="Red" Width="20" Height="20" />
<TextBlock Text="Third top-level item" />
<Ellipse Fill="Red" Width="20" Height="20" />
</StackPanel>
</TreeViewItem.Header>
<TreeViewItem Header="Child a" />
<TreeViewItem Header="Child b" />
<TreeViewItem Header="Child c" />
</TreeViewItem>
</TreeView>
</Page>
{ 0 nhận xét... read them below or add one }
Đăng nhận xét