You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
// (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
|
|
/// <summary>
|
|
/// Extension methods for the ResourceDictionary class.
|
|
/// </summary>
|
|
public static class ResourceDictionaryExtensions
|
|
{
|
|
/// <summary>
|
|
/// Makes a shallow copy of the specified ResourceDictionary.
|
|
/// </summary>
|
|
/// <param name="dictionary">ResourceDictionary to copy.</param>
|
|
/// <returns>Copied ResourceDictionary.</returns>
|
|
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
|
|
}
|