My legs are wet with the MVVM pattern for WPF, and everything works as it should.
But I am connecting the viewmodel to my datacontext view from my code in my window.
Of course, the point of MVVM is to get rid of the code in the windows ... that it does perfectly, so I was left with two simple lines to connect my datacontext to my view model.
Is there an alternative?
Or is it acceptable to have only 2 lines to connect the Viewmodel in my window code?
Is it possible to connect a viewmodel to a view via XAML? I think this is probably (unsure). But will this cause problems? Is this recommended?
Really appreciated any help?
source
share