Templates
that describe how they look on the screen.Button
will take on the standard look of a button on its respective operating system.Models
.methods
(functions), properties
and use events
to notify other parts of the MVVM architecture when something has changed in the system.event
.Model
part of MVVM, all self contained, the models
know nothing about any of the other parts.users
interact with your business logic or models
. There needs to be a way for your UI to interact with the business logic. We do this using a ViewModel
. A ViewModel
knows about the Model
that it represents. It does not know anything about the layout or design of the UI or View
part.ViewModel
is essentially special type of Model
that represents all the data
that will be displayed in the UI. It also represents all the actions
that can be done with the UI. For example what happens when a button is clicked.ViewModel
will subscribe
to or observe
events on a model so that it knows when something in your system has changed, with the intention that it can then update the UI so the user
will know about it.ViewModel
will also call or trigger functionality in response to user input like a Button
being clicked
.ViewModel
and the information it provides that can be displayed in the UI.View
can retrieve data
to display with the use of Bindings
. Bindings
can also be used for interactions
to be communicated back to the ViewModel
.