I found a question asking about ways to avoid adding custom value converters to one's application resources:
Using Value Converters in WPF without having to define them as resources first
However I'd like to go one step beyond that and register converters that are then implicit, as in this example:
<SolidColorBrush Color="Blue" />
Here, I am assuming that some implicit "StringToSolidColorBrushConverter" is kicking-in that makes the example work.
This example does not work:
<Window.Resources>
<Color x:Key="ForegroundFontColor">Blue</Color>
</Window.Resources>
<TextBlock Foreground={StaticResource ForegroundFontColor}>Hello</TextBlock>
I believe that's because there is no implcit ColorToSolidColorBrushConverter
that WPF can just pick up and use. I know how to create one, but how would I "register" it so that WPF uses it automagically without specifying the converter in the binding expression at all?