// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
namespace System.Windows.Controls.DataVisualization
{
#if SILVERLIGHT
///
/// Extension methods for the ResourceDictionary class.
///
public static class ResourceDictionaryExtensions
{
///
/// Makes a shallow copy of the specified ResourceDictionary.
///
/// ResourceDictionary to copy.
/// Copied ResourceDictionary.
public static ResourceDictionary ShallowCopy(this ResourceDictionary dictionary)
{
ResourceDictionary clone = new ResourceDictionary();
foreach (object key in dictionary.Keys)
{
clone.Add(key, dictionary[key]);
}
return clone;
}
}
#endif
}