Assigning Keyboard Shortcut to your WPF Form

A coworker asked me recently how to assign a keyboard shortcut or access key for a control on a WPF form. I remembered the “&” from Windows Forms but then I realized that this would not be a correct answer because using a '&' in XAML would require typing “&amp” due to XML syntax. As it turns out, you just need to use the “_” (underscore) character instead of a “&” to assign a shortcut key on a WPF Form.