1

I am new to WPF and am writing a basic app using the excellent Modern UI and Modern Charts projects. As things stand, though, the difference in color between the charts and the rest of the application is substantial - this doesn't look visually pleasing at all.

I can change the background of the charts no problem, but I can't find the exact color used for the Dark Theme on Modern UI. Is there a way to reference it directly, or is there a way to find the color?

Many Thanks

Jiminy Cricket
  • 1,377
  • 2
  • 15
  • 24

1 Answers1

0

You can peek the BaseDark.xaml source to find the color you wanted (copied relevant parts here) :

<Color x:Key="BlackColor">#FFFFFFFF</Color>
<Color x:Key="WhiteColor">#FF252525</Color>
<Color x:Key="Gray1">#FFF9F9F9</Color>
<Color x:Key="Gray2">#FF7F7F7F</Color>
<Color x:Key="Gray7">#FF7E7E7E</Color>
<Color x:Key="Gray8">#FF454545</Color>
<Color x:Key="Gray10">#FF2F2F2F</Color>
<Color x:Key="GrayNormal">#FF7D7D7D</Color>
<Color x:Key="GrayHover">#FFAAAAAA</Color>
<Color x:Key="FlyoutColor">#FF2B2B2B</Color>

You can also reference the color resource directly using it's Key value as a SataticResource.

har07
  • 88,338
  • 12
  • 84
  • 137