Change Opacity of image to act as button. (Universal Function)
C#, WPF, VS2017
I have about 50 images in a separate grid (grid2) from the main grid, that I need to act as a button. I know how to do this programmatically with Event Handler Mouse Enter & Mouse Leave then image1.Opacity = "0.5". The problem with that is I do not want 100 lines of code and 100 different Event Handlers.
So the question is, how can I go about changing Opacity to "0.5" on enter and "1" on leave for only the images in Grid2 as a global type of Function or in XAML?
Thanks in advance!
0 comments:
Post a Comment