title: WPF Set ListViewItem.Background With Binding
body: <p>I have a ListView in grid mode in which I display a list of data. The grid works, but I'm not able to bind the Background property. If "FileExists == false", then I want to display the line in red. Why is this not working?</p>
  
  <p>The list gets loaded in Windows.Loaded. I also added the [ImplementPropertyChanged] attribute to the data class (using NuGet PropertyChanged.Fody) but that didn't help.</p>
  
  <pre><code>&lt;ListView x:Name="VideosView" TabIndex="2" SelectedValuePath="VideoId" Margin="10,50,10,37" ButtonBase.Click="VideosView_ColumnHeaderClick"&gt;
      &lt;ListView.Resources&gt;
          &lt;Style TargetType="{x:Type ListViewItem}"&gt;
              &lt;Style.Triggers&gt;
                  &lt;DataTrigger Binding="{Binding FileExists}" Value="False"&gt;
                      &lt;Setter Property="Background" Value="Red" /&gt;
                  &lt;/DataTrigger&gt;
              &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/ListView.Resources&gt;
      &lt;ListView.View&gt;
          &lt;GridView&gt;
              &lt;GridViewColumn DisplayMemberBinding="{Binding Artist, Mode=OneWay}" Header="Artist" Width="100"/&gt;
              &lt;GridViewColumn DisplayMemberBinding="{Binding Title, Mode=OneWay}" Header="Title" Width="300"/&gt;
              &lt;GridViewColumn DisplayMemberBinding="{Binding Length, Converter={StaticResource TimeSpanConverter}, Mode=OneWay}" Header="Length" Width="40"/&gt;
          &lt;/GridView&gt;
      &lt;/ListView.View&gt;
      &lt;ListView.ItemContainerStyle&gt;
          &lt;Style TargetType="ListViewItem"&gt;
              &lt;EventSetter Event="Control.MouseDoubleClick" Handler="VideosView_ItemDoubleClick"/&gt;
          &lt;/Style&gt;
      &lt;/ListView.ItemContainerStyle&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>Data class</p>
  
  <pre><code>[ImplementPropertyChanged]
  public class VideoListItem {
      public VideoListItem() {
      }
  
      public int VideoId { get; set; }
      public string Artist { get; set; }
      public string Title { get; set; }
      public string FileName { get; set; }
      public int? Length { get; set; }
      public bool FileExists { get; set; }
      public bool IsInDatabase { get; set; }
  }
  </code></pre>