0

Here's my XAML code:

<ListView.ItemTemplate>
    <DataTemplate x:DataType="local:Foo">
        // other controls omitted
        <Button Click="OnClick"/>
    </DataTemplate>
</ListView.ItemTemplate>

And here's my event handler:

private void OnClick(object sender, RoutedEventArgs e) {
    // I have to access here the foo object bound to the listview row
}

So how do I access the object bound to the listview item/row?

I have searched everywhere including Microsoft documentation but nothing seems to work :(.

Sid Go
  • 2,041
  • 3
  • 16
  • 29

0 Answers0