Reputation: 10834
Im writing a windows 8 note-taking app and Ive got a Listview hooked up to a SQL database from Azure and a ListViewItem Template with a stackpanel and inside a checkbox plus some text..
When i left click or tap an item, it does not get selected, but rightclicking does. How can i get it to select the listview item by leftclicking?
<ListView x:Name="noteListView" Margin="20,0,0,0" IsItemClickEnabled="True" ItemClick="noteListView_ItemClick" >
Upvotes: 2
Views: 1120
Reputation: 18803
Two things:
IsItemClickEnabled
to False
SelectionChanged
event and not the click eventXaml:
<ListView x:Name="noteListView" Margin="20,0,0,0"
IsItemClickEnabled="False" SelectionChanged="noteListView_SelectionChanged">
Upvotes: 2