title: WPF treeview ItemTemplate and ItemTemplateSelector are ignored
body: <p>In my application, I have been getting this error each time the treeView loads it's items. This error makes my application slow on load and takes at least two minutes to load.</p>
  
  <p>The error is: <code>System.Windows.Data Error: 26 : ItemTemplate and ItemTemplateSelector are ignored for items already of the ItemsControl's container type; Type='TreeViewItem'</code></p>
  
  <p>My xaml code for the treeview is: (I'm using VB.net on my ViewModel)</p>
  
  <pre><code>&lt;TreeView ScrollViewer.VerticalScrollBarVisibility="Hidden" 
            ItemContainerStyle="{DynamicResource tviStyle}" 
            Background="#FFF0F0F0" BorderBrush="#FFE5E2DB" 
            IsEnabled="{Binding isTreeEnable}" 
            ItemsSource="{Binding PostcodeLijst}" 
            Margin="0" Name="dgStamOverzichtPostcode" /&gt;
  </code></pre>
  
  <p>The binding of the ItemsSource is an ObservableCollection(Of TreeViewItem) thats is filled from a database.</p>
  
  <p>I have looked in google for answer but so far I have been not been able to find it! Does anybody knows how to fix this?</p>
  
  <p>Thanks in advance for any help</p>