title: WPF (MVVM): Wiring up viewModel to view in code-behind of Window?
body: <p>I have been getting my feet wet with MVVM pattern for WPF and everything is working  as it should..</p>
  
  <p>But i am wiring up the viewmodel to my view datacontext from my codebehind of my window.</p>
  
  <p>Sure enough the point of MVVM is to get rid of code behind in windows... which it does great, so i am left with 2 simple lines to wire up my datacontext to my viewmodel.</p>
  
  <p>Is there an alternative?</p>
  
  <p>Or is it acceptable to have only 2 lines to wire up the Viewmodel in my window code behind?</p>
  
  <p>Is it possible to wire up the viewmodel to the view via XAML? I think it probably is (unsure) -  But would this cause issues? Is it recommended?</p>
  
  <p>Really appreciated any help?</p>