DotVVM Academy

DataContext

This application is not supported on mobile browsers.

Conclusion

Good job! Now you know what DataContext is!


Summary

  • Binding Context is the default target of bindings.
  • Every control has it inside its DataContext property.
  • By default, controls inherit their DataContext from their parent.
  • The DataContext of the document root is the ViewModel.
  • If a DataContext of a control is set null, the control doesn't get rendered.

Interactive sample: DataContext

Download Solution