2

I'm an newbie when it comes to using Template 10. I'm building an app using the Hamburger template and I'm struggling with changing the default colors. Below is what I find in the standard Custom.xaml file:

    <Color x:Key="CustomColor">SteelBlue</Color>
    <Color x:Key="ContrastColor">White</Color>
    <Color x:Key="SystemAccentColor">SteelBlue</Color>

Changing it to:

   <Color x:Key="CustomColor">LightGrey</Color>
    <Color x:Key="ContrastColor">White</Color>
    <Color x:Key="SystemAccentColor">LightGrey</Color>

Gives me the following error:

Failed to create a 'Windows.UI.Color' from the text 'LightGrey'.

What did I do wrong and how do I change the default color throughout the app?

2 Answers2

3

You have not spelled the color correctly. The correct spelling is the American form LightGray (replace the e with an a)

Glen Thomas
  • 10,190
  • 5
  • 33
  • 65
1

The Color tag is used to create colors, from hex or RGB values. LightGray is already a color.

You can use the LightGray color in a brush

<SolidColorBrush x:Key="MyBrush" Color="LightGray"/>
Glen Thomas
  • 10,190
  • 5
  • 33
  • 65