public static void PutMany(this ResourceDictionary dict, ResourceDictionary source) { foreach (var entry in source.AsEnumerable()) { if (dict.ContainsKey(entry.Key)) { dict.Remove(entry.Key); } dict.Add(entry.Key, entry.Value); } }