Cloud Training (Online)




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>