Last active
December 14, 2015 06:49
-
-
Save anakahala/5045986 to your computer and use it in GitHub Desktop.
2つのObservableCollectionで、ある条件を満たした(キーが同一)値を削除
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ObservableCollection<Item> items = this.ListView.DataContext as ObservableCollection<Item>; | |
| selected.ToList().ForEach((s) => | |
| { | |
| Item item = items.Where((i) => i.Value == s.Value).SingleOrDefault(); | |
| if (item != null) | |
| { | |
| items.Remove(item); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment