title: wpf listview unselect items
body: <p>I have two ListView. The main idea is raise <code>TestCommand</code> when user select item from <code>FirstList</code> and <code>TestTestCommand</code> when user select item from <code>SecondList</code>. In this case how to unselect item from <code>FirstList</code> when user select item in <code>SecondList</code>, and uselect in <code>SecondList</code> when user select in <code>FirstList</code>.
  I tried to insert <code>&lt;ei:ChangePropertyAction TargetName="FirstList" PropertyName="SelectedIndex" Value="-1"&gt;&lt;/ei:ChangePropertyAction&gt;</code> into  <code>&lt;i:EventTrigger EventName="SelectionChanged"/&gt;</code> but this is bad idea.</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;ListView Width="200" Height="200" ItemsSource="{Binding Items}" HorizontalAlignment="Left" Name="FirstList"&gt;
          &lt;ListView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Button Content="{Binding .}"&gt;
                  &lt;/Button&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
          &lt;i:Interaction.Triggers&gt;
              &lt;i:EventTrigger EventName="SelectionChanged"&gt;
                  &lt;i:InvokeCommandAction Command="{Binding DataContext.TestCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type vm:MainWindow }}}"&gt;&lt;/i:InvokeCommandAction&gt;
              &lt;/i:EventTrigger&gt;
          &lt;/i:Interaction.Triggers&gt;
      &lt;/ListView&gt;
      &lt;ListBox Width="200" Height="200" ItemsSource="{Binding Items}" HorizontalAlignment="Right" x:Name="SecondList" &gt;
          &lt;ListBox.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;Button Content="{Binding .}"&gt;
                  &lt;/Button&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListBox.ItemTemplate&gt;
          &lt;i:Interaction.Triggers&gt;
              &lt;i:EventTrigger EventName="SelectionChanged"&gt;
                  &lt;i:InvokeCommandAction Command="{Binding DataContext.TestTestCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type vm:MainWindow }}}"&gt;&lt;/i:InvokeCommandAction&gt;
              &lt;/i:EventTrigger&gt;
          &lt;/i:Interaction.Triggers&gt;
      &lt;/ListBox&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>code</p>
  
  <pre><code>namespace WpfApplication129
  {
  /// &lt;summary&gt;
  /// Interaction logic for MainWindow.xaml
  /// &lt;/summary&gt;
  public partial class MainWindow : Window
  {
  
      public MainWindow()
      {
          DataContext = new Data();
          InitializeComponent();
      }
  }
  public class Data
  {
      public ICommand TestCommand { get; set; }
      public ICommand TestTestCommand { get; set; }
      public List&lt;string&gt; Items { get; set; }
      public Data()
      {
          TestCommand = new RelayCommand(() =&gt; Test());
          TestTestCommand = new RelayCommand(() =&gt; TestTest());
          Items = new List&lt;string&gt;();
          Items.Add("first");
      }
      public void Test()
      {
          MessageBox.Show("Running");
      }
      public void TestTest()
      {
          MessageBox.Show("TestRunning");
      }
  }
  }
  </code></pre>