Answer the question
In order to leave comments, you need to log in
How to set Color from Settings?
There are colors and brushes of this kind:
<SolidColorBrush x:Key="MyBrush" Color="#FF00FF00"/>
<Color x:Key="MyColor">#FF00FFFF</Color>
Answer the question
In order to leave comments, you need to log in
In code, create a System.Windows.Media.Color object based on the information in Settings and assign it to the desired property or resource.
Your binding doesn't work because #FF00FFFF is not a color but a string. When described in Xaml, the converter automatically works from text to Color. When setting a binding for such a conversion, you must explicitly specify the converter. As far as I understand, System.Windows.Media.ColorConverter is used there. You need to specify an instance of this class in the Converter parameter or write your own converter from text to color or brush.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question