title: How to use the same DataTrigger for multiple DataTemplate?
body: <p>I want to set a DataTrigger for multiple DataTemplate but I am not sure if there is way to do that?
  I have view structured like below </p>
  
  <pre><code>&lt;ItemsControl ItemsSource="{Binding Collection}"
                AlternationCount="2"
                ItemTemplateSelector="{StaticResource RowSelector}" &gt;
  &lt;local:HeaderTemplateSelector x:Key="RowSelector"
              NormalTemplate="{StaticResource NormalTemplate}"
              ExpanderTemplate1="{StaticResource ExpanderTemplate1}"
              ExpanderTemplate2="{StaticResource ExpanderTemplate2}"
              ExpanderTemplate3="{StaticResource ExpanderTemplate3}"  /&gt;
  &lt;DataTemplate x:Key="NormalTemplate" ...&gt;
      &lt;stackpanel  x:Name="main"
  &lt;DataTemplate x:Key="ExpanderTemplate1" ...&gt;
      &lt;Grid  x:Name="main" ..&gt;
  &lt;DataTemplate x:Key="ExpanderTemplate2" ...&gt;
      &lt;Expander  x:Name="main"
  &lt;DataTemplate x:Key="ExpanderTemplate3" ...&gt;
      &lt;Textblock  x:Name="main" ...&gt;
  </code></pre>
  
  <p>I want this data trigger which provides alternative background for rows, the trigger defined below </p>
  
  <pre><code>&lt;DataTemplate.Triggers&gt;
      &lt;Trigger Property="ItemsControl.AlternationIndex" Value="0"&gt;
          &lt;Setter Property="Background" Value="Blue" TargetName="main"/&gt;
      &lt;/Trigger&gt;
      &lt;Trigger Property="ItemsControl.AlternationIndex" Value="1"&gt;
          &lt;Setter Property="Background" Value="black"  TargetName="main"/&gt;
      &lt;/Trigger&gt;
  &lt;/DataTemplate.Triggers&gt;
  </code></pre>
  
  <p>I can add this to the end of each DataTemplate and it works fine but it mean that I have to duplicate the some code 4 times, is there any way to avoid that? (I know I can use datagrid but it is overkill for this simple structure)</p>