title: wpf CheckBox Command in a DataTemplate
body: <p>I have a DataTemplate like this:</p>
  
  <pre><code>&lt;DataTemplate x:Key="CheckBoxDataTemplate"&gt;
      &lt;CheckBox IsChecked="{Binding 
                Path=IsSelected, Mode=TwoWay}" 
                HorizontalAlignment="Center" 
                VerticalAlignment="Center" Name="aDM_LEVEL_FIELDListView" Path="SelectedItem"&gt;
          &lt;i:Interaction.Triggers&gt;
              &lt;i:EventTrigger EventName="Checked"&gt;
                  &lt;WPFCtlr:EventToCommand Command="{Binding DataContext.UnCheckCommand, RelativeSource={RelativeSource FindAncestor,ListView,1}}" CommandParameter="{Binding ElementName=_thisChk}" /&gt;
                  &lt;!--&lt;i:InvokeCommandAction Command="{Binding Path=SelectItemRelayCommand}" /&gt;--&gt;
              &lt;/i:EventTrigger&gt;
          &lt;/i:Interaction.Triggers&gt;
      &lt;/CheckBox&gt;
      &lt;!--Command="{Binding Path=DataContext.UnCheckCommand}" 
                CommandParameter="{Binding Path=IsChecked, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" /&gt;--&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>This is the templateSelector:</p>
  
  <pre><code>&lt;TemplateSelector:PropertyDataTemplateSelector x:Key="templateSelector"
        BooleanDataTemplate="{StaticResource CheckBoxDataTemplate}" 
        IsEnum="IsExclusive"/&gt;
  </code></pre>
  
  <p>And this is the <code>ListView</code> where the template is referenced:</p>
  
  <pre><code>&lt;ListView   Grid.Row="1"
      ItemsSource="{Binding Path=FilteredLevelFields}"
      Margin="5,10,5,5" 
      Name="aDM_LEVEL_FIELDListView" 
      SelectionMode="Single"
      FontSize="13"
      Background="AliceBlue"
      BorderBrush="AliceBlue" 
      SelectedItem="{Binding Path=CurrentElement}"&gt;
  
      &lt;!--Style of items--&gt;
          &lt;ListView.ItemContainerStyle&gt;
              &lt;Style TargetType="{x:Type ListViewItem}"&gt;
                  &lt;!--Properties--&gt;
                  &lt;Setter Property="Control.HorizontalContentAlignment" Value="Stretch" /&gt;
                  &lt;Setter Property="Control.VerticalContentAlignment" Value="Center" /&gt;
                  &lt;!--Trigger--&gt;
                  &lt;Style.Triggers&gt;
                      &lt;Trigger Property="IsSelected" Value="True"&gt;
                          &lt;Setter Property="Background" Value="{x:Null}" /&gt;
                          &lt;Setter Property="BorderBrush" Value="{x:Null}" /&gt;
                      &lt;/Trigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/ListView.ItemContainerStyle&gt;
  
          &lt;ListView.View&gt;
              &lt;GridView ColumnHeaderContainerStyle="{StaticResource GridViewColumnHiddenHeaderStyle}"&gt;
                  &lt;GridViewColumn Header="ID LEVEL FIELD" CellTemplate="{StaticResource FatherTemplate}" Width="300"/&gt;
                  &lt;GridViewColumn Header="Value" CellTemplateSelector="{StaticResource templateSelector}" Width="80" /&gt;
                  &lt;GridViewColumn Header="ID LEVEL FIELD" CellTemplate="{StaticResource DetailIdenTemplate}" Width="300"/&gt;
              &lt;/GridView&gt;
          &lt;/ListView.View&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>This is the command in my ViewModel:</p>
  
  <pre><code>RelayCommand _unCheckCommand;
  public ICommand UnCheckCommand
  {
      get
      {
          if (_unCheckCommand == null)
          {
              _unCheckCommand = new RelayCommand(
                  param =&gt; this.UnCheck(param),
                  param =&gt; this.CanUnCheck
              );
          }
          return _unCheckCommand;
      }
  }
  </code></pre>
  
  <p><strong>My goal is to pass to the Command, as parameter, the element I select in my listview. How do I do that?</strong></p>