title: WPF treeview does not show child nodes when not adding them in vm's constructor
body: <p>I have a strange problem with a WPF treeview. In my viewmodel I am doing this:</p>
  
  <pre><code>private ObservableCollection&lt;ITreeItem&gt; _Tree = new ObservableCollection&lt;ITreeItem&gt;();
  public ObservableCollection&lt;ITreeItem&gt; Tree
  {
      get { return this._Tree; }
  }
  </code></pre>
  
  <p>Now when I add some dummy Parent / child data in the constructor of the viewmodel like this:</p>
  
  <pre><code>var parent = new ParentItem(1, "test", "test2");
  this.Tree.Add(parent);
  for (int i = 0; i &lt; 10; i++)
  {
      parent.Childs.Add(new Child { Name= "test", Description= "test2" });
  }
  parent.IsExpanded = true;
  </code></pre>
  
  <p>the tree is displaying correctly.</p>
  
  <p>However, as soon as I am adding some child items via a method (with dispatcher) they do not show at all. When i call this method, for example, only the root node is showing.</p>
  
  <pre><code>public void Update()
  {
      DispatcherSingleton.Instance.CurrentDispatcher.BeginInvoke(DispatcherPriority.Normal, 
          new Action(delegate
          {
              var parent = new ParentItem(1, "test", "test2");
              this.Tree.Add(parent);
              for (int i = 0; i &lt; 10; i++)
              {
                  parent.Childs.Add(new Child { Name= "test", Description= "test2" });
              }
              parent.IsExpanded = true;
          })
      );
  }
  </code></pre>
  
  <p>Here is the XAML for the treeview</p>
  
  <pre><code>&lt;ResourceDictionary&gt;
      &lt;Style TargetType="TreeViewItem" x:Key="itmContStyle"&gt;
          &lt;Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /&gt;
      &lt;/Style&gt;
      &lt;Style TargetType="{x:Type TreeViewItem}"&gt;
          &lt;Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /&gt;
          &lt;Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /&gt;
      &lt;/Style&gt;
      &lt;HierarchicalDataTemplate x:Key="hDataTemplate"  ItemsSource="{Binding Childs}"&gt;
          &lt;StackPanel Orientation="Horizontal"&gt;
              &lt;Image Source="{Binding Image, Mode=TwoWay}" Margin="1" /&gt;
              &lt;Image x:Name="currentImage" Source="/WpfApp;component/Resources/Images/ac.png" Visibility="Collapsed"&gt;&lt;/Image&gt;
              &lt;TextBlock Text="{Binding SortOrder}" Margin="1" /&gt;
              &lt;TextBlock Text="." Margin="0,1,1,0" /&gt;
              &lt;TextBlock Text="{Binding Bezeichnung}" Margin="1" /&gt;
          &lt;/StackPanel&gt;
          &lt;HierarchicalDataTemplate.Triggers&gt;
              &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=TreeViewItem}, Path=IsSelected}" Value="True"&gt;
                  &lt;Setter TargetName="currentImage" Property="Visibility" Value="Visible"/&gt;
              &lt;/DataTrigger&gt;
          &lt;/HierarchicalDataTemplate.Triggers&gt;
      &lt;/HierarchicalDataTemplate&gt;
  &lt;/ResourceDictionary&gt;
  
  ...
  
  &lt;TreeView  HorizontalAlignment="Stretch"  VerticalAlignment="Top" 
             BorderThickness="0" 
             ItemsSource="{Binding Tree}"            
             ItemContainerStyle="{StaticResource itmContStyle}" ItemTemplate="{StaticResource hDataTemplate}"&gt;
  &lt;/TreeView&gt;
  </code></pre>