title: WPF Trigger binding to MVVM property
body: <p>I have a datatemplate containing an image that I want to be hidden if the the value of a property in a ViewModel is true. Can anyone tell me why the the xaml below does not work?</p>
  
  <pre><code>&lt;Image x:Name="img" Source="..\Images\List_16.png" Margin="0,0,5,0"&gt;
    &lt;Image.Style&gt;
      &lt;Style&gt;
        &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding CurrentListHasPendingChanges}" Value="True"&gt;
            &lt;Setter Property="Image.Visibility" Value="Hidden" /&gt;
          &lt;/DataTrigger&gt;
          &lt;DataTrigger Binding="{Binding CurrentListHasPendingChanges}" Value="False"&gt;
            &lt;Setter Property="Image.Visibility" Value="Visible" /&gt;
          &lt;/DataTrigger&gt;
        &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
    &lt;/Image.Style&gt;
  &lt;/Image&gt;
  </code></pre>