title: UWP remove item in listview by clicking a button in listview
body: <p>I would like to remove an item from the listview when I click a button in the listview row. The listview row is composed by a textbox and a button: I need to get the name of the text in the textbox becouse it is used in xml file, which populate the listview itself.</p>
  
  <p><strong>XAML</strong></p>
  
  <pre><code>&lt;ListView x:Name="listView_names" HorizontalAlignment="Left" Height="169" Margin="52,221,0,0" VerticalAlignment="Top" Width="336" &gt;
      &lt;ListView.ItemTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;StackPanel&gt;
  
                  &lt;TextBlock Text="{Binding Name}"&gt;&lt;/TextBlock&gt;
                  &lt;Button x:Name="removeBtn" Content="Remove" HorizontalAlignment="Left" Margin="0,30,0,0" VerticalAlignment="Top" Width="100" Background="#FF888888" Foreground="#FF292C33"  Click="remove_Click"/&gt;
  
              &lt;/StackPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/ListView.ItemTemplate&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/TulsS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TulsS.png" alt="listview with buttons"></a></p>