The simplest way is to use the built in data binding to get user selections.
public class MyData
{
public int Id { get; set; }
public string Name { get; set; }
}
XAML for displaying the data
<listview x:name="lst_Data" xmlns:x="#unknown">
<listview.view>
<gridview>
<gridview.columns>
<gridviewcolumn header="ID" displaymemberbinding="{Binding Id}" />
<gridviewcolumn header="Name" displaymemberbinding="{Binding Name}" />
</gridview.columns>
</gridview>
</listview.view>
</listview>
And something along these lines when loading and binding the data here
public void LoadMyData()
{
MyData[] _myData = FetchMyData();
lst_Data.DataContext = typeof(MyData);
lst_Data.ItemsSource = _myData;
}
And then to get which data is selected by the end user
public void UserSelectedSomething(object sender, EventArgs e)
{
if (lst_Data.SelectedItem == null)
return;
MyData selectedData = lst_Data.SelectedItem as MyData;
if (selectedData == null)
else
}