title: Treeview SelectedItemChanged is not fired with custom data
body: <p>I am trying to represent information from related datatables customers&lt;-products into a treeview.</p>
  
  <p>Due to performance issues I wanted to use Backgroundworker, but there is a gotcha - no GUI units (also TreeViewItem in other thread than STA possible).</p>
  
  <p>So I defined my own "STA-thread-safe" class:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Collections.ObjectModel;
  using System.ComponentModel;
  
  namespace XXX.YYY
  {
  public class TreeViewNode: INotifyPropertyChanged
  {
      #region [ Header ]
      private string _header;
      public string Header
      {
          get
          {
              return _header;
          }
  
          set
          {
              _header = value;
              OnNotifyPropertyChanged("Header");
          }
      } 
      #endregion
  
      #region [ Tag ]
      private string _tag;
      public string Tag
      {
          get
          {
              return _tag;
          }
  
          set
          {
              _tag = value;
              OnNotifyPropertyChanged("Tag");
          }
      } 
      #endregion
  
      #region [ Items ]
      private ObservableCollection&lt;TreeViewNode&gt; _items;
  
      public ObservableCollection&lt;TreeViewNode&gt; Items
      {
          get
          {
              if (_items == null)
              {
                  _items = new ObservableCollection&lt;TreeViewNode&gt;();
              }
  
              return _items;
          }
  
          set
          {
              _items = value;
              OnNotifyPropertyChanged("Items");
          }
      } 
      #endregion
  
      #region [ Property_Changed_Utilities ]
      public event PropertyChangedEventHandler PropertyChanged;
  
      private void OnNotifyPropertyChanged(String info)
      {
          // Note: Do not forget to add interface 
          // "INotifyPropertyChanged" to your class.
          if (PropertyChanged != null)
          {
              PropertyChanged(this, new PropertyChangedEventArgs(info));
          }
      }
      #endregion
  
      public TreeViewNode()
      {         
      }
  
  }
  }
  </code></pre>
  
  <p>And an Template in XAML for representing:</p>
  
  <pre><code>&lt;TreeView Name="treeview"
        ItemsSource="{Binding RelativeSource=
            {RelativeSource Mode=FindAncestor,AncestorType=Window},
        Path=TreeViewData}"
        SelectedItemChanged="treeview_SelectedItemChanged"&gt;
  
      &lt;TreeView.Resources&gt;
          &lt;Style TargetType="TreeViewItem"&gt;
              &lt;Setter Property="ItemTemplate"&gt;
                  &lt;Setter.Value&gt;
                      &lt;DataTemplate&gt;
                          &lt;TreeViewItem Header="{Binding Header}" 
                                        ItemsSource="{Binding Items}" /&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/TreeView.Resources&gt;
      &lt;TreeView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;TreeViewItem Header="{Binding Header}" 
                            ItemsSource="{Binding Items}" /&gt;
          &lt;/DataTemplate&gt;
      &lt;/TreeView.ItemTemplate&gt;
  </code></pre>
  
  <p>It is working so far - showing populated tree with subitems as wished. Also expanding/collapsing works...</p>
  
  <p>BUT - no event is risen - there is no reaction on SelectedItemChanged.</p>
  
  <p>Any help appreciated! Thank you very much in advance!</p>