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);

Leave a Reply

Your email address will not be published. Required fields are marked *

Liked this content?. Please spread the word :)

  • RSS
  • Twitter
    Visit Us
    Follow Me