title: Changing one ListViews style affects other ListViews also
body: <p>I have a WPF ControlTemplate that contains a ListView (Lets call this 'Original ListView') and another custom WPF control that has its own Control Template containing a ListView (Lets call this 'Custom ListView').</p>
  
  <p>I am changing the Original ListViews Style like so: </p>
  
  <pre><code>&lt;Style TargetType="{x:Type ListView}" BasedOn="{StaticResource ListViewStyle}"&gt;
      &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MyClass}}, Path=MyVariable}" Value="0"&gt;
          &lt;Setter Property="ListView.ItemsPanel" Value="{StaticResource itemsPanelTemplate1}"/&gt;
          &lt;/DataTrigger&gt;
          &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:MyClass}}, Path=MyVariable}" Value="1"&gt;
          &lt;Setter Property="ListView.ItemsPanel" Value="{StaticResource itemsPanelTemplate2}" /&gt;
          &lt;/DataTrigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt; 
  
  &lt;ListView x:Name="My_ListView"  ItemsSource="{Binding}" ItemContainerStyle="{DynamicResource MyListViewItemStyle}"/&gt;
  </code></pre>
  
  <p>What I am seeing is that when I change the style for Original ListView by changing MyVariable the Custom ListViews style also changes.</p>
  
  <p>How can I avoid this so that the style change only affects the ListView I want?</p>