I am trying to define a standard foreground color for the controls in my page. However, I get the error “An object of the type “System.String” cannot be applied to a property that expects the type “Windows.UI.Xaml.Media.Brush”.
In myPage.xaml
<TextBlock TextWrapping="Wrap"
Foreground="{StaticResource ForegroundThemeBrush}" />
In StandardStyles.xaml
<ResourceDictionary x:Key="Default">
<x:String x:Key="BackgroundThemeBrush">#484848</x:String>
<x:String x:Key="ForegroundThemeBrush">#efefef</x:String>
</ResourceDictionary>
you need to define
SolidColorBrushnotx:String