private void ItemList_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { ListView listView = sender as ListView; if (listView == null) { return; } MatchItems file = listView.SelectedItems[0] as MatchItems; if (file == null) { return; } if (file.Action == Actions.Keep) { file.Action = Actions.Delete; } else { file.Action = Actions.Keep; } ItemList.Items.Refresh(); }
public void PopulateItems() { ItemList.ItemsSource = _matchedItems; MatchItems mi = new MatchItems() { Name = FileDetail.FileName, Path = FileDetail.FilePath }; _matchedItems.Add(mi); foreach (FileDetails fd in FileDetail.Matches) { MatchItems mi2 = new MatchItems() { Name = fd.FileName, Path = fd.FilePath, Store = fd }; _matchedItems.Add(mi2); } SetItemToDelete(); KeepOne(); }