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

Published on July 25, 2015 by abundantcode

Filed under Universal Windows App, XAML

Last modified July 25, 2015

Print this page

rate 1 star rate 2 star rate 3 star rate 4 star rate 5 star
Your rating: none, Average: 0 (0 votes)

This article have been viewed 3498 times

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);
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Comment


x

You might be Interested in these Posts

How to delete user account from command line in Windows 10 ?

You can delete a user account from command line in Windows 10 using the net user command and specify...

How to add new user account from command line in Windows 10 ?

You can add a new user account in Windows 10 using command prompt using the net user command and pas...

How to open display settings from command line in Windows 10 ?

The display properties can be found in the settings app in Windows 10 which lets the users to config...