Search code examples
c#wpffreezable

Dictionaries<K, V> in Freezables


I want to create a Freezable that contains a Dictionary as one DependencyProperty. So I think I need a freezable Dictionary because it must not be changed when the Freezable gets frozen... or am I wrong? If so what do I really have to do?


Solution

  • Even though it is possible to use a Lookup, I finally ended up writing a FreezableDictionary so that I do not get IEnumerables as I would using a Lookup. It uses a simple Dictionary as a backing.