title: Is it okay to declare the view model as a static resource in a view?
body: <p>When writing a MVVM WPF app, there's always a point where the view model has to be set to as the data context of the view. For me, usually that's in code. But I realized that if I declare the view model as a static resource inside the xaml and set the binding there, I don't need to do it in code anymore. This means I don't have to coordinate the view and the viewmodel in a third class somewhere, like in the App. </p>
  
  <p>Is it acceptable to do this?</p>
  
  <p>Thanks!</p>