I can't use this as the button is in the template for the dialog and bound to an ICommand in my ViewModel.
I have got around this now by adding an event handler for the ShowDialog event to the Schedule. When this executes, I store a reference to the dialog in a member variable in the code-behind.
_dialog = e.DialogViewModel as SchedulerDialogViewModel;
When I click the button, I raise an event which is handled in the code-behind and calls