Given a Settings.settings
file that contains one or more SolidColorBrush
entries on it with Application
scope, how can I bind these values to XAML style templates?
For instance, I'll have a SolidColorBrush
named MyAppColor
with #FF0091D2
as value and a custom Button
style template, where I want the Background
to have the color from MyAppColor
. How can I achieve this?
I have already tried adding a namespace (?)
to the xaml file, like this:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:properties="clr-namespace:namespace.Properties"
Then tried to use the properties
like this:
Background="{x:Static properties:Settings.Default.MyAppColor}"
But it says it can't have nested types.