title: MVVM light listview selecteditem
body: <p>How can I get the selecteditem from my listview in mvvm light wpf?</p>
  
  <p>I have a collection and created a selected item property but I cant get the binding right for the selected item.</p>
  
  <p>This is my viewmodel:</p>
  
  <pre><code>        ObservableCollection&lt;DTO.Dossier.Dossier&gt; _dossiers;
      public ObservableCollection&lt;DTO.Dossier.Dossier&gt; Dossiers
      {
          get { return _dossiers; }
          set
          {
              _dossiers = value;
              RaisePropertyChanged("Dossiers");
          }
      }
  
          private DTO.Dossier.Dossier _selectedDossier;
      public DTO.Dossier.Dossier SelectedDossier
      {
          get { return _selectedDossier; }
          set
          {
              if (_selectedDossier != value)
                  _selectedDossier = value;
  
              RaisePropertyChanged("SelectedDossier");
  
          }
      }
  </code></pre>
  
  <p>And this is the xaml for the listview:</p>
  
  <pre><code>                &lt;ListView  ItemsSource="{Binding Dossiers}" Margin="0,5,0,0" Name="LstDossiers" SelectedItem="{Binding SelectedDossier, Mode=OneWay}"&gt;
                  &lt;i:Interaction.Triggers&gt;
                      &lt;i:EventTrigger EventName="SelectionChanged"&gt;
                          &lt;cmd:EventToCommand Command="{Binding SelectDossierCommand}"
                                  CommandParameter="{Binding SelectedDossier,
                                        ElementName=LstDossiers}" /&gt;
                      &lt;/i:EventTrigger&gt;
                  &lt;/i:Interaction.Triggers&gt;
                  &lt;ListView.View&gt;
                      &lt;GridView&gt;
                          &lt;GridViewColumn Header="Id"  
          DisplayMemberBinding="{Binding Id}" /&gt;
                          &lt;GridViewColumn Header="Omschrijving" 
          DisplayMemberBinding="{Binding Omschrijving}" /&gt;
                      &lt;/GridView&gt;
                  &lt;/ListView.View&gt;
              &lt;/ListView&gt;
  </code></pre>
  
  <p>The command is working but the binding to the SelectedDossier isn't.</p>