title: Get selected Value in ListView c#
body: <p>I just want to get the selected item in my ListView.</p>
  
  <p>This the XAML:</p>
  
  <pre><code>&lt;TabItem Header="Musique" Background="#1874CD" BorderBrush="#68838B"&gt;
      &lt;ListView x:Name="ListM" Width="Auto" Background="#D1EEEE" ItemsSource="{Binding Path=MediaCollection}" Margin="-8,-0.877,-1,-2.925" SelectionChanged="ListM_SelectionChanged"&gt;
          &lt;ListView.View&gt;
              &lt;GridView AllowsColumnReorder="True" &gt;
                  &lt;GridViewColumn Header="" Width="Auto" &gt;
                      &lt;GridViewColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Image Name="IconImage" Source="{Binding IconUri}" Panel.ZIndex="2" Width="15" Height="15"&gt;&lt;/Image&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/GridViewColumn.CellTemplate&gt;
                  &lt;/GridViewColumn&gt;
                  &lt;GridViewColumn DisplayMemberBinding="{Binding Title}" Header="Titre" Width="auto" /&gt;
                  &lt;GridViewColumn DisplayMemberBinding="{Binding Composer}" Header="Artiste" Width="70" /&gt;
                  &lt;GridViewColumn DisplayMemberBinding="{Binding Length}" Header="Durée" Width="50" /&gt;
                  &lt;GridViewColumn DisplayMemberBinding="{Binding Album}" Header="Album" Width="70" /&gt;
              &lt;/GridView&gt;
          &lt;/ListView.View&gt;
      &lt;/ListView&gt;
  </code></pre>
  
  <p>I insert item with this piece of code :</p>
  
  <pre><code>ListM.Items.Add(new ListGrid() { IconUri = imagemp3.Source, Title = Ftitle, Length = duration, Album = Falbum, Composer = Fcomposer });
  </code></pre>
  
  <p>I need to get these details (<code>Title</code>, <code>Length</code>, ...) when I select an item on my list. I've tried but had many issues and it still doesn't work.</p>