DotVVM Academy

DataContext

This application is not supported on mobile browsers.

Back to Root

We need buttons to call the Load and Unload methods.

Even inside a Binding Context that is deep within the hierarchy, you can access the ViewModel using the _root pseudo-variable:

<dot:Button Click="{command: _root.Unload()}"
            Text="Unload" />

There is a number of other binding pseudo-variables such as _parent, _collection or _this.


Tasks

  • Add a <dot:Button> outside the <div> and command-bind its Click property to the Load method.
  • Add a <dot:Button> that invokes the Unload method inside the <div> element. Don't forget to use _root - the Unload method is declared in the ViewModel, not in the Profile class.
MessageLineColumn