This gives me an error: "#FF25A0DA" is not a valid value for property 'Color'.
How to get a valid color value in xaml?
3 Answers, 1 is accepted
answered on 15 Aug 2016, 09:00 AM
The error is occurring because you are assigning a SolidColorBrush as a Color property of a SolidColorBrush. The brush resources of our themes (e.g. AccentBrush) are already SolidColorBrushes.
You can achieve the desired result by getting the color value of the AccentBrush ( I could guess it is #FF25A0DA ) and change its opacity. The structure of the ColorValue is [AA][RR][GG][BB], where AA is alpha. So you can redefine the Color as #1925A0DA (as 19 is 10% of FF).
Or in a similar way you are setting it now with Opacity as a separate property, only assign a color to the Color setter, not a SolidColorBrush reference.