In WinForms it was easy to trigger a button click in code, because the System.Windows.Forms.Button class has a public method called PerformClick that you can call directly.
However, in WPF you end up using the System.Windows.Controls.Button class instead, in which I'm not readily seeing any equivalent method. There is a method called OnClick but it's protected and I'm not sure it would actually trigger a click anyway; it seems to be fired in tandem with the click event.
var button = new System.Windows.Controls.Button();
// how would I trigger the click event here, programmatically?