Following on from the previous post , which briefly introduced Caliburn.Micro (CM) Action, this article continues with the next CM feature: Convention.
What Is a Convention?
Convention is often translated as “pact” or “agreement”—a shared rule of conduct that all parties, having reached consensus, follow. In CM, Convention is mainly used for pairing and matching. That pairing primarily means pairing the View with the ViewModel. As mentioned earlier, CM is based on the MVVM pattern. In MVVM (Model-View-ViewModel), the Model holds the data and is relatively fixed; the relationship between View and ViewModel is more fluid. Let’s briefly introduce that.
View-First or ViewModel-First?
In MVVM, the ViewModel’s job is to hold the View’s state and encapsulate the Model’s data. The ViewModel evolved from the PresentationModel pattern, and it does not store every piece of View state—only state that might be modified. WPF mainly contributed two technologies that made the ViewModel practical:
Data binding.…