Once you have the event wired up, getting the current row only takes a couple lines of code.
private void listPictures_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
Shern.PhotoManager.Common.ImageProperty value = (Shern.PhotoManager.Common.ImageProperty)listPictures.SelectedValue;
PictureViewer pictureViewer = new PictureViewer(value.FileName);
pictureViewer.Show();
} |
In this example ImageProperty is the type that is bound to the ListView control.
0 Comments on “Click Detection in a WPF Listview”
Leave a Comment