So I have a rectangle with no background and I want to give it a background gradient when the user hovers their mouse over it, and then remove the gradient when the mouse leaves the rectangle.
Please can someone post the code that is needed for this, and tell me where to put it in the .cs/xaml file?
Thanks.
This:
(Note that if you set
Fill="Transparent"on the Rectangle itself the Trigger will not work because of dependency property value precedence)