We want to start develop an intermediate desktop software. We decided to use the WPF. We don\'t want to use the MVVM pattern. Because we are not familiar with MVVM, and als
There is no requirement to use MVVM. One can use the visual designer to drag n' drop controls onto the design surface. Double click on a button and get an event handler in the code-behind. Let's not forget setting properties & event handlers via the PropertyGrid. All exactly as is done in Winforms.
Without a DataContext data binding doesn't work. If you wish to use databinding, the first examples I've seen set the Window's DataContext = this; in the constructor. In this case the windows acts as its own 'ViewModel'.
You can also use MVVM with View-First. No DI or IoC required.
public class MyViewModel
{
}
public class MyWindow
{
public MyWindow()
{
DataContext = new MyViewModel();
}
}
Of course the next step is implementing DI/IoC using Unity.