So far I have this
<UserControl.Resource>
<LinearGradientBrush x:Key="KeyDownBrush" .....>
Now I would like to access this defined resource when a key is pressed and replace the current objects fill with the KeyDownBrush, in C#.
I've tried this.Resource.Contains("KeyDownPress") and have been able to get True returned so I presume I am almost there but I'm not sure how to access the object and Parse it correctly to a Brush instance.
Any guidance would be appreciated.