title: How to set color to selected item at TreeView
body: <p>I try to set Red color to selected item on TreeView:</p>
  
  <pre><code> &lt;TreeView x:Name="tvVisual" Grid.Row="0" Grid.RowSpan="2"
                    VirtualizingStackPanel.IsVirtualizing="True" 
  ItemsSource="{Binding Childrens,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"      
                    VirtualizingStackPanel.VirtualizationMode="Recycling"
                    &gt;
              &lt;TreeView.ItemTemplate&gt;
                  &lt;HierarchicalDataTemplate 
  ItemsSource="{Binding Childs,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"&gt;
                      &lt;TextBlock Text="{Binding Path=Value.Name}"/&gt;
                  &lt;/HierarchicalDataTemplate&gt;
              &lt;/TreeView.ItemTemplate&gt;
  
  
              &lt;TreeView.ItemContainerStyle&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;Setter Property="FontWeight" Value="Normal" /&gt;                            
  
                      &lt;Style.Triggers&gt;
                          &lt;Trigger Property="IsSelected" Value="True"&gt;
                              &lt;Setter Property="BorderBrush" Value="Red"/&gt;
                              &lt;Setter Property="Background" Value="Bisque"/&gt;
                          &lt;/Trigger&gt;
  
                          &lt;!-- Selected but does not have the focus --&gt;
                          &lt;MultiTrigger&gt;
                              &lt;MultiTrigger.Conditions&gt;
                                  &lt;Condition Property="IsSelected" Value="True"/&gt;
                                  &lt;Condition Property="IsSelectionActive" Value="False"/&gt;
                              &lt;/MultiTrigger.Conditions&gt;
                              &lt;Setter Property="BorderBrush" Value="Red"/&gt;
                          &lt;/MultiTrigger&gt;
                      &lt;/Style.Triggers&gt;                        
                  &lt;/Style&gt;
              &lt;/TreeView.ItemContainerStyle&gt;
  
  
          &lt;/TreeView&gt;
  </code></pre>
  
  <p>I took some part of code from <a href="https://stackoverflow.com/questions/5047576/wpf-treeview-how-to-style-selected-items-with-rounded-corners-like-in-explorer">this Sheridan answer</a>, but it not works for me.
  If i change IsSelected property to IsExpanded - it works.
  At my getter\setter: value changed.</p>
  
  <p>May be it can help: i select and expand all subnodes by code.</p>
  
  <p>So, how to make IsSelected item set new color?
  Thank you!</p>
  
  <p>P.S. and it is strange- but at getter\setter PropertyChanged is null...</p>
  
  <pre><code> private bool _isSelected;      
      public bool IsSelected
      {
          get
          {
              return _isSelected;
          }
          set
          {
              _isSelected = value;
              OnPropertyChanged("IsSelected"); //PropertyChanged is null.
          }
  
      }
  </code></pre>