I have a simple question. Can Visual states be defined through code for a button in WP8? We can change visual states through code using GoTo function but can visual states be defined in the code behind?
Suppose on the click of a button I need to change the image of it? Is there any method by which you can change the background through visual states.