I have 2 ListView controls here, let's say Listview1 and Listview2, respectively. What I would like to achieve is that I want the first item in Listview2 to be selected & highlighted whenever Listview1's SelectionChanged event is triggered.
I have tried to use the following line of code to make it happened but I guess it's not correct.
private void ListView1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Listview2.SelectedIndex = 0;
}
The first item in Listview2 is still not selected & highlighted. Can anyone help? Thanks very much in advance.
Edit: That line is correct. It didn't work because I placed it before the line of code that was doing dynamic loading. No wonder.... :)