This is much easier to achieve if you use the databinding features of WPF. If I was writing this, I'd create a class that represented the hierarchy of data that you want to display - this would be bound to from the XAML. I would write the class to look something like this:
public class JobType
{
public JobType()
{
JobTypes = new ObservableCollection<JobType>();
}
public ObservableCollection<JobType> JobTypes { get; set; }
public string Name { get; set; }
}
Next, I'd add a reference to this class in my view model like this:
public ObservableCollection<JobType> JobTypes { get; set; }
We are going to bind the treeview to this top level item, and use a HierarchicalDataTemplate to bind to the JobTypes entry in each instance of JobType.
<TreeView ItemsSource="{Binding JobTypes}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding JobTypes}" DataType="{x:Type local:JobType}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" />
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.ItemTemplate>
</TreeView>
Make sure that you add a reference to your XAML to the namespace that contains the JobType class (I've called it local in the DataType markup).