Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


CSharp Programming

CSharp > Code Examples

Add Ellipse, TextBlock to a Tree

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Add Ellipse, TextBlock to a Tree <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>