I have a WPF window, which contains a button called Cancel. Under ordinary circumstances I want a user to be able to press Alt+C to cancel their actions and close the program. As such, the button is captioned "_Cancel."
Problem 1: During Window_Load, if I press C without modifiers, the Cancel_Clicked event fires, and the program closes.
Problem 2: After my program opens, assuming I don't interact with anything on the window, pressing C without modifiers will close the program.
Note that, due to problem 2, using some sort of boolean to track the "loaded" status won't work.
What am I doing wrong? Any ideas?