I have made my own custom converter which given a string returns a Brush
. Now I'm able to return constant brushes such as Brushes.Red
etc., but I really want to use my own colors which I have defined in an application-wide resource.
How do I reference application-wide resources from my own custom converter class? I'd use FindResource
but as I said, this is from my own converter class, not a window or control.
If these are defined on your Application, you can use Application.Current.FindResource() to find them by name.