I have a collection that I am displaying in a WPF Listview. I will have an edit button in each row and need to pass an ID to another control on the screen when that's clicked. I'm not going to be editing in place so I'm not using the Gridview.
How do I pass this ID to my other control?
Currently my XAML looks like this.
<ListView Name="uxPackageGroups" ItemsSource="{Binding PackageGroups}" BorderThickness="0" Grid.Row="6" Grid.Column="1" Width="300" BorderBrush="#FF0000E8">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Name="uxStackPanel" Orientation="Horizontal">
<Button Content="Edit" Width="50" />
<Label Content="{Binding Name}" Height="20" Margin="0" Padding="0"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
This WPF newbie thanks you in advance!