Edit: I completely agree with BladeWise.
Nowhere does it say that MVVM requires the view to be any shape. You should view the *.xaml.cs as an extension of the view and as such it is completely fine to use for view related work. There is a great mix up in what MVVM means, ultimately all it requires is that the Model, the View and the ViewModel are separate concerns, any other rule after that is completely outside the scope of the pattern.
Nowhere does it say that MVVM requires the view to be any shape. You should view the *.xaml.cs as an extension of the view and as such it is completely fine to use for view related work. There is a great mix up in what MVVM means, ultimately all it requires is that the Model, the View and the ViewModel are separate concerns, any other rule after that is completely outside the scope of the pattern.