title: How to set a WPF ListView Selected Item color?
body: <p>I am trying to recreate the Mail UI from Windows 8 in a WPF application running on Windows 7. Here's what I want to achieve:</p>
  
  <p><img src="https://i.stack.imgur.com/KgtAy.png" alt="Target UI"></p>
  
  <p>In particular, I don't know how to change the background color for selected items e.g. the Inbox item in the first column and the mail from Twitter in the second column. I have tried several solutions from other similar Stackoverflow Questions but none seem to work for me. e.g.</p>
  
  <p><a href="https://stackoverflow.com/questions/1462232/selected-item-loses-style-when-focus-moved-out-in-wpf-listbox">Selected item loses style when focus moved out in WPF ListBox</a></p>
  
  <p><a href="https://stackoverflow.com/questions/382006/wpf-listview-inactive-selection-color/382162#382162">WPF ListView Inactive Selection Color</a></p>
  
  <p>Here is the code I have for my listview:</p>
  
  <pre><code>&lt;ListView Grid.Row="0" SelectedItem="{Binding Path=SelectedArea}" ItemsSource="{Binding Path=Areas}" Background="#DCE3E5" &gt;
  
                      &lt;ListView.Resources&gt;
  
                          &lt;!-- Template that is used upon selection of an Area --&gt;
                          &lt;ControlTemplate x:Key="SelectedTemplate" TargetType="ListViewItem"&gt;
                              &lt;Border Background="#388095" Cursor="Hand" &gt;
                                  &lt;TextBlock Text="{Binding Name}" Margin="5" /&gt;
                              &lt;/Border&gt;                                
                          &lt;/ControlTemplate&gt;
  
                          &lt;Style TargetType="ListViewItem"&gt;
                              &lt;Setter Property="Template"&gt;
                                  &lt;Setter.Value&gt;                                        
                                      &lt;!-- Base Template that is replaced upon selection --&gt;
                                      &lt;ControlTemplate TargetType="ListViewItem"&gt;
                                          &lt;Border Background="#DCE3E5" Cursor="Hand"  &gt;
                                              &lt;TextBlock Text="{Binding Name}" Margin="5" /&gt;
                                          &lt;/Border&gt;
                                      &lt;/ControlTemplate&gt;
                                  &lt;/Setter.Value&gt;
                              &lt;/Setter&gt;
                              &lt;Style.Triggers&gt;
                                  &lt;MultiTrigger&gt;
                                      &lt;MultiTrigger.Conditions&gt;
                                          &lt;Condition Property="IsSelected" Value="true" /&gt;
                                      &lt;/MultiTrigger.Conditions&gt;
                                      &lt;Setter Property="Template" Value="{StaticResource SelectedTemplate}" /&gt;
                                  &lt;/MultiTrigger&gt;
                              &lt;/Style.Triggers&gt;
                          &lt;/Style&gt;
  
                      &lt;/ListView.Resources&gt;                        
  
                  &lt;/ListView&gt;
  </code></pre>
  
  <p>How can I change the background color of the selected item? And how do I retain the color change when the focus changes.</p>