I have used an ObservableCollection with WPF for binding and this works well. What I really want at the moment is a Dictionary like one, that has a key that I can use, so effectively like "ObservableCollection".
Can you suggest the code that could be used to provide such an ObservableCollection? The goal is to have a Dictionary like structure that I can bind to from WPF.
Thanks
How about:
var collection = new ObservableCollection<KeyValuePair<TKey, TValue>>();
You should be able to address it with:
collection.First(x => x.Key == *your key value*)
.Key or .Value
Someone already made it. I haven't try it yet but nothing to lose.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With