<TreeView ItemsSource="{Binding Repairs}" Grid.Row="0" Grid.ColumnSpan="5" HorizontalAlignment="Stretch" Margin="2,2,0,0" Name="treeView1" VerticalAlignment="Stretch" >
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Repair1}" DataType="{x:Type model:Repair}">
<StackPanel Orientation="Horizontal">
<TextBox Text="{Binding Code}" />
<TextBox Text="{Binding Name}" />
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
public partial class Repair
{
public Repair()
{
this.Repairs1 = new ObservableCollection<Repair>();
}
public decimal Code { get; set; }
public string Name { get; set; }
public Nullable<decimal> FK_RepairGroup { get; set; }
public bool IsGroup { get; set; }
public virtual ObservableCollection<Repair> Repairs1 { get; set; }
public virtual Repair Repair1 { get; set; }
}