How do I simulate the press of a WPF button from within code? I would like to call a method from within my code and have a particular button on a WPF form look like (visually behave like)ÃÂ it had been pressed and releasedÃÂ (and presumably also fire its click event). I seem to recall doing this years ago with win forms and VB. Thanks!
Why? I have a form with several buttons and some keyboard shortcuts for those buttons. When a user presses the appropriate key, I would like to provide visual feedback that the key that was pressed was equivalent to a particular button.
View Complete Post