Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

ListView Item Selected

$
0
0

I have a listview as shown in the code below. How can I get the selected row info when selected in the code behind.

<Grid x:Name="LICGRID" Margin="50,412,51,10" Grid.Row="1" HorizontalAlignment="Stretch"><ListView Name="listviewlic" ItemsSource="{Binding}" HorizontalAlignment="Stretch" SelectedItem="{Binding lgridstackpanel}"><ListView.ItemTemplate><DataTemplate><StackPanel x:Name="lgridstackpanel" Orientation="Horizontal" ><TextBlock Text="{Binding LicenseCount}" Width="150" HorizontalAlignment="Left" FontFamily="Global User Interface"></TextBlock><TextBlock Text="{Binding title}"  Width="250" HorizontalAlignment="Center" TextAlignment="Left"></TextBlock><TextBlock Text="{Binding LicenseKey}"  Width="300" HorizontalAlignment="Left" FontFamily="Global User Interface"></TextBlock><TextBlock Text="{Binding LicenseInvoice}"  HorizontalAlignment="Left" Width="200"></TextBlock><TextBlock Text=""  HorizontalAlignment="Left" Width="200"></TextBlock><TextBlock Text=""  HorizontalAlignment="Left" FontFamily="Global User Interface" ></TextBlock></StackPanel></DataTemplate></ListView.ItemTemplate></ListView></Grid>
Thanks in advance.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>