In this video, I'm explaining how to subscribe to control events and add your code-behind:
Includes:
click event
Reading user input
Verification of user input
Writing result to the UI
Passing and accessing event object to the subscribed function
Method of accessing the controls shown here is one of tho ways of doing that.
You can check out the DataContext video to learn the second method, which is more suitable form ore complex applications