WPF Change button background image when clicked
问题 I have created a Button and set its background Image . What I want is when the Button is clicked, I want to replace the background Image with another one How can I accomplish this? Here is my code with the Button : <Button x:Name="PopulationReporting" Click="PopulationReporting_Clicked" Width="172" Height="60" Margin="57,170,57,184"> <Button.Background > <ImageBrush ImageSource="images/img-2.png" /> </Button.Background> </Button> 回答1: You can do this programmatically (see example here) or You