If you are trying to write an application in WPF that separates the UI from the underlying business logic (otherwise known as Model-View patterns), you may have noticed that some of the features in WPF don't always make that easy.
Commands are an example of this. Although defining and using a command in Xaml is fairly straightforward, you are currently pushed to declare the handlers that do the work in the code-behind, going against the mantra of separation, and making harder to get some of the benefits of encapsulation.
There's a few options you might consider: