Below is a sample code snippet demonstrating how the entries can be added to the ResourceDirectory in WPF application using C#.
How to add entries to ResourceDirectory in WPF using C# ?
System.Windows.ResourceDictionary resourceDirectoryGK = new System.Windows.ResourceDictionary(); System.Windows.Media.Color GKColor1 = System.Windows.Media.Colors.White; System.Windows.Media.Color GKColor2 = System.Windows.Media.Colors.Black; resourceDirectoryGK.Add("1", GKColor1); resourceDirectoryGK.Add("2", GKColor2);