title: How to extract values from the button in listbox?
body: <p>I am trying to create a sports news app. I've created one button inside the listbox which shows all the News,description,etc. There are no. of buttons depends on xml file. When i click on the button i want to show the News and description from that button on the the next page. how do i do that? Thanks</p>
  
  <pre><code>&lt;ListBox x:Name="lstShow" FontFamily="Arial Black" VerticalAlignment="Center"
     Margin="-6,0,0,-26" Height="610" RenderTransformOrigin="0.5,0.5"
     Background="{x:Null}" Opacity="0.8"&gt;
      &lt;ListBox.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Grid&gt;
                  &lt;Button Width="450" Height="Auto" Background="Black" 
                    BorderBrush="Transparent" FontWeight="Bold" FontSize="23" 
                    HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,0,0,5" 
                    Opacity="0.95" Click="news_click" Foreground="White"&gt;
                      &lt;StackPanel&gt;
                          &lt;Image Source="{Binding Imageurl}" Width="200" Height="Auto"
                            HorizontalAlignment="Center" VerticalAlignment="Center" /&gt;
                          &lt;TextBlock   TextWrapping="Wrap" FontFamily="Segoe WP Black" 
                            Foreground="White" FontSize="18" HorizontalAlignment="Stretch" 
                            VerticalAlignment="Stretch" TextAlignment="Left" Width="350" 
                            Height="150"&gt;
                          &lt;Run FontSize="23" Text="{Binding News}" /&gt;
                          &lt;LineBreak/&gt;
                          &lt;Run Text="{Binding Desc}" FontWeight="Normal" FontSize="16" 
                            FontFamily="Segoe WP SemiLight"/&gt;
                          &lt;LineBreak/&gt;
                          &lt;Run Text="{Binding Newsurl}" FontWeight="Normal" FontSize="16" 
                            FontFamily="Segoe WP SemiLight"/&gt;
  
                       &lt;/TextBlock&gt;
                    &lt;/StackPanel&gt;
                 &lt;/Button&gt;
              &lt;/Grid&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListBox.ItemTemplate&gt;
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>Code Behind:</p>
  
  <pre><code>myData = XDocument.Parse(e.Result, LoadOptions.None);
  // var data = myData.Descendants("headlines").FirstOrDefault();
  var data1 = from query in myData.Descendants("headlinesItem")
      where query.Element("images").Descendants("imagesItem").Any()
      select new UpdataNews
      {
          News = (string)query.Element("headline").Value,
          Desc = (string)query.Element("description"),
          Newsurl = (string)query.Element("links").Element("mobile").Element("href"),
          Imageurl = (string)query.Element("images").Element("imagesItem").Element("url"),
      };
  lstShow.ItemsSource = data1;
  </code></pre>