title: How to trigger DataTemplateSelector when property changes?
body: <p>I have ContentPresenter with DataTemplateSelector:</p>
  
  <pre><code>    ...
  
      public override DataTemplate SelectTemplate(object item, DependencyObject container)
      {
          var model = item as ItemControlViewModel;
  
          if (model.CurrentStatus == PrerequisitesStatus.Required)
          {
              return RequiredTemplate;
          }
  
          if (model.CurrentStatus == PrerequisitesStatus.Completed)
          {
              return FinishedTemplate;
          }
  
          ...
  
          return InProgressTemplate;
      }
  </code></pre>
  
  <p>When CurrentStatus is changed, OnPropertyChanged is called.</p>
  
  <p>I need somehow to trigger this DataTemplateSelector when the property is changed and change ContentPresenter DataTemplate. Any suggestions?</p>
  
  <p>Threre are similar questions:
  <a href="https://stackoverflow.com/questions/3543515/wpf-reapply-datatemplateselector-when-a-certain-value-changes">1</a>
  <a href="https://stackoverflow.com/questions/2376173/wpf-activate-trigger-when-a-mvvm-bound-property-changes">2</a>, but I don't want to use any DataTriggers, because of too much states.</p>
  
  <p>Tried to play with DataTriggers</p>
  
  <pre><code>    &lt;ContentPresenter
          Grid.Column="1"
          Height="16"
          Width="16"
          Margin="3"&gt;
          &lt;ContentPresenter.Triggers&gt;
              &lt;DataTrigger Binding="{Binding Path=CurrentStatus}" Value="0"&gt;
                  &lt;Setter Property="ContentPresenter.ContentTemplate" Value="{StaticResource ResourceKey=_requiredStatusTemplate}" /&gt;
              &lt;/DataTrigger&gt;
          &lt;/ContentPresenter.Triggers&gt;
      &lt;/ContentPresenter&gt;
  </code></pre>
  
  <p>But got an error: 
  Triggers collection members must be of type EventTrigger :(</p>