Adding entries to ResourceDictionary in Xaml

Do you want to add an entry in the ResourceDictionary in your Windows 10 App using Xaml ? . Below is a sample code snippet demonstrating the process to add two colors to the ResourceDictionary.

How to add entries to ResourceDictionary in Xaml ?

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:secondaryns="http://schemas.microsoft.com/winfx/2006/xaml">
   <Color secondaryns:Key="1">Red</Color>
   <Color secondaryns:Key="2">Blue</Color>
</ResourceDictionary>

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.
Pin It

Leave a Reply

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