Share your content and reach out to more developers by submitting them at Abundantcode.com - Developer Community Site

How to add entries to ResourceDirectory in Windows 10 UWP Apps using C# ?

Below is a sample code snippet demonstrating how the entries can be added to the ResourceDirectory in Windows 10 UWP application using C#.

How to add entries to ResourceDirectory in Windows 10 UWP Apps using C# ?

ResourceDictionary resourceDir = new ResourceDictionary();
Windows.UI.Color redColor = Windows.UI.Colors.Red;
Windows.UI.Color blueColor = Windows.UI.Colors.Blue;
resourceDir.Add("item1", redColor);
resourceDir.Add("item2", blueColor);
Tags :

Leave Your Comment