Home.NETAdding entries to ResourceDictionary in Xaml

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>

Leave a Reply

You May Also Like

In this post, you’ll learn about the error message “WorkbookNotSupported – The file you selected cannot be opened because it...
  • .NET
  • December 17, 2022
In this post, you’ll learn about the error message “SpecifiedRangeNotFound – The requested range does not exist in the sheet.”...
  • .NET
  • December 17, 2022
In this post, you’ll learn about the error message “SheetRangeMismatch – The sheet provided as the sheet argument is not...
  • .NET
  • December 17, 2022