Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This part is especially meant for the MVVM part.

Handling of viewmodels

Note

TODO: Write

 In other MVVM frameworks, you are obliged to set the data context of a view manually. It will look something like this:

Code Block
var view = new PersonView();
view.DataContext = new PersonViewModel();

Catel automatically resolves the right view model based on the view. If a view is created, Catel automatically creates the view model:

Code Block
var view = new PersonView();
// view model is automatically created

It goes even further. Catel can create view models based on the data context. For more information, read nested user controls.