Ok, I am having more problems with my C# WPF ListView control. Here it is in all its glory:
Just wanted to be more clear with the code
Getting selected item
XAML:
CS:
private void TheList_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
MyItemClass SelectedItem = (MyItemClass)TheList.SelectedItem;
if (SelectedItem != null)
MessageBox.Show(SelectedItem.Title);
}
And for double clicking item (almost the same)
XAML:
CS:
private void TheList_SelectionChanged(object sender, MouseButtonEventArgs e)
{
MyItemClass SelectedItem = (MyItemClass)TheList.SelectedItem;
if (SelectedItem != null)
MessageBox.Show(SelectedItem.Title);
}