> 
> **Possible Duplicate:**  
> 
> [XAML Code for TREEVIEW](https://stackoverflow.com/questions/6004356/xaml-code-for-treeview) 
> 
> 
> 

Following is the code for TreeView in XAML:

```xml
<TreeView Height="338" HorizontalAlignment="Left" Margin="6,6,0,0"
          Name="DisksTreeView1" VerticalAlignment="Top" Width="293">
    <TreeView.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <Image Source="{Binding ImagePath}" Width="32" Height="32"/>
                <TextBlock Text="{Binding Namee}"/>
            </StackPanel>
        </DataTemplate>
    </TreeView.ItemTemplate>
</TreeView>

```

And following is the code behind:

```
Dim adpt As New DatabaseDearDataSetTableAdapters.DiskListTableAdapter
For Each k As KeyValuePair(Of String, GenreSet) In GenreSetDictionary
    Dim t As New TreeNodeSet
    t.Genre = True
    t.Imagepath = k.Value.IconPath
    t.Namee = k.Key
    Dim pnode As New TreeViewItem
    pnode.DataContext = t
    For Each z As DatabaseDearDataSet.DiskListRow In adpt.GetDataByGenre(t.Namee)
        Dim tt As New TreeNodeSet
        tt.Genre = False
        tt.Imagepath = IconDictionary(z.DiskIcon).IconPath
        tt.Namee = z.DiskName
        Dim cnode As New TreeViewItem
        cnode.DataContext = tt
        pnode.Items.Add(cnode)
    Next
    DisksTreeView1.Items.Add(pnode)
Next

```

I am able to get the `pnode` added to the TreeView and all the node breakpoints are hit. The problem is that in the TreeView, I am only able to see the parent view arrow, the rest of the name, image, etc. are not getting displayed. It is like this:

[![Sample picture](https://i.stack.imgur.com/sX2vA.jpg)](https://imageshack.com/)

How can I fix this?